-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIP install failing on Windows 10 #476
Comments
same question! |
Thanks for reporting the issue. I don't have a Windows machine to try it, but it looks like you don't have If it's not the case, could you clone the repo and run |
Huzzah! thanks @sbarzowski. Adding For others having this problem, I installed msys-base and added it to my windows PATH and created a distutils.cfg, specifying to use the mingw32 compiler, in C:\YourPythonDirectoryRoot\Lib\distutils. For Google Fu and cross platform debugging purposes I am adding the error I got when using the Visual Studio compiler. You'll notice it is trying to use the C++ for Python library and still fails.
|
@sbarzowski I may have celebrated too early... When I try to import jsonnet I am getting a DLL load failed error.
Thoughts? |
It's a shame it doesn't say which procedure it is. One idea is that maybe hardcoded |
Do you want me to write another issue for it? Or is this something that probably wont be supported in the near future? |
We can follow up on it in this issue, I think. We would like it to work flawlessly on Windows machines. However, it can be quite tricky to fix issues on Windows, because contributors, from what I observed, tend to use Linux or Mac. So, to be honest, it can take a while before someone gets a Windows machine to debug this. Any help would be greatly appreciated. |
I've started work on AppVeyor builds #469. They currently only build the core product, but it shouldn't take much to build and test Python modules against multiple version of Python. The standard AppVeyor images come with many versions preinstalled https://www.appveyor.com/docs/build-environment/#python. |
Have you tried using the contents of the vs2017 dir to build Jsonnet itself? It may be possible to extend that to build the _jsonnet.dll. However I don't think what you're doing (running the Python bindings in Windows) has ever been done before. In principle it should work though. |
Are there any alternatives for getting it to work on Windows? |
I also need a workaround for jsonnet on Windows 10 |
i also need |
Hi @sbarzowski and @marcelocantos , I also needed jsonnet to build and run on my Windows machine.
This got me to the point where
I suspect there should be a way to set the platform to be x64, but it was beyond my C++ knowledge. And here is the full error stacktrace, if it helps:
|
Pip is an additional complication here, let's get the basic build working from source first. I suspect the only way to a smooth experience here is to build more natively with windows instead of using Make. There's vs2017 files in the repo that might help. Also there is cmake, which can generate them (I don't think anyone's tried this). You would probably have to add the python module to these things, which would mean figuring out how to link against the Python SDK in the IDE. |
Thanks @sparkprime , |
It should just be a case of adding python/_jsonnet.c into the mix and building a DLL but I've never done it on windows. You'd have to point it to the python headers and libraries too, but I imagine they come with any Python installation. |
Python is compiled with MSVC and your library with g++ so maybe there is a problem with ABI. |
I managed to run
|
Thanks for writing this up! |
@alexpolozov Thanks for the writeup but sadly did not fix it for me. I feel utterly useless but I just switched from macOS to Windows so I have no idea where to begin to fix this.
|
@RXminuS The message |
@alexpolozov Thank you so much for the instructions. I think that patch is not working correctly. I get the following error in the final step:
Any ideas? |
@zeeshansayyed This error is not about the patch. Your error is at the linking stage ( |
@alexpolozov I confirmed. It does have both the (dl) C:\Users****\AppData\Local\Continuum\anaconda3\envs\dl\libs>dir
Note: Also, the complete log of
|
@zeeshansayyed Please read the questions above yours. The message Generally speaking, there are about 3-4 things that can go wrong during this installation, they are indicated with different errors at different steps of the installation, and my walkthrough addresses them in order. |
@alexpolozov My apologies. The previous log I posted was from the wrong terminal which didn't have the environment variable updated. The lines from the first log (my first comment) are posted below. Please ignore the log containing
|
@alexpolozov It looks like the linker is not able to find
It is actually looking in So this has really confused me. Can you suggest anything that can solve this problem? Thanks a lot |
Hey, my cmd to patch is: copy cygwinccompiler.py '~cygwinccompiler.py' pip install patch pause cd C:\Users***\AppData\Local\Programs\Python\Python37 cd C:\Users***\AppData\Local\Programs\Python\Python37\libs pause pause` but I get an error: |
while the patch cmd errors:
|
@alexpolozov
|
Please give a try to this command pip install -e git+https://github.com/Toilal/jsonnet.git#egg=jsonnet This is fork #781 in action, it only requires Visual C++ Build Tools available. |
I followed the above insturctions and i got : |
Tried it with Python 3.8.2 and latest VC++ 14.27 still gets some issues:
|
@Bnorus you should maybe run pip install inside "Developer Console Prompt for VS 2019", or invoke |
Or upgrade setuptools |
I followed your steps to the T, and when I ran the pip install jsonnet command, it fails with this error: Any advice? Am I missing anything? |
Everyone: my instructions were written 10 months ago. They worked for the jsonnet build at that time, but the build process has changed since. It now depends on more Unix tools being present in the PATH, which are not available on Windows by default. They would need to be brought into PATH from MinGW, just like I did with the |
I am having trouble installing the jsonnet python package. In particular the build step is failing. Here is my output from pip
I have run the pip install command in the Visual Studio 2017 and Visual Studio 2015 command prompt with python tools installed and received the same error. I also tried installing MinGW, added its bin folder to my path, and specified in the distutils.cfg to use the mingw32 compiler (as seen below) with no success.
Distutils.cfg
I also tried downloading the tar directly from here and running the build command below and received the same error.
I'm not sure what else to try. Are there wheels available for windows?
Thanks,
Bert
The text was updated successfully, but these errors were encountered: