Closed igrowing closed 2 years ago
Thanks for reaching out. Windows has always caused me a bit of trouble.
I see you are pointing the at cmake to be used as the compiler. Unfortunately this won't work, cmake is a build system, not a compiler.
Do you have a C++ compiler installed on your system? E.g. the Visual Studio Build Tools here?
You will need a C++ compiler, and the above toolkit is the only way to get cuda support to work on windows as well so I recommend that one.
Once the build tools are installed, cmake should be able to find the compiler on its own without needing to specify it. However you may still run into problems where the anaconda shell does not see the build tools without some work unfortunately.
I'm not currently in a spot where I can do testing but I can try to reproduce this behavior later tonight.
Working on mobile sorry for the terse comment.
Another suggestion: this may not work for you, but you can also try to install pyscamp under WSL.
In the meantime let me know if installing the MS build tools helps at all.
Thanks for ideas, @zpzim . Indeed WSL was my first mind but it dropped because I need to run pyscamp and visualize the results under the same conda environment on Windows. Switch to Linux was better option however it would require several hours of installations and configurations. Tried to install mingw and then:
(base) C:\Users\user>set CC=C:\msys64\mingw64\bin\gcc.exe
(base) C:\Users\user>set CXX=C:\msys64\mingw64\bin\gcc.exe
(base) C:\Users\user>pip install pyscamp
This still failed on the same nmake error.
As solution pip install stumpy
until I figure out how to compile this on windows.
Okay, so if you are using minGW can you try adding the following to your environment (In addition to the CC an CXX flags):
set CMAKE_GENERATOR="MinGW Makefiles"
Nmake is the default generator on windows which is probably why you are seeing that error.
Let me know if that helps. I will also try to test this when I get home.
Okay so I did some testing on my Windows 11 machine.
I installed msys2 via the link and instructions you mentioned in your earlier comment. Once I added C:\msys64\mingw64\bin
to my system PATH, I was able to open the anaconda prompt and do the following:
set CMAKE_GENERATOR=MinGW Makefiles
pip install pyscamp
This worked and built/installed pyscamp with mingw. However, when I tried to import pyscamp I got a DLL import error.
It turns out that there are some conda packages which can install their own versions of the mingw dlls under the anaconda directory (e.g. C:\Users\...\anaconda3\Library\mingw-w64\bin
) these DLLs conflict with the ones used to build mingw applications built with msys. I'm not sure which packages these are, and I need to do more testing to see if these packages show up on a fresh install of Anaconda.
The problem is that these DLLs are the first to load in a conda environment. I was able to get pyscamp to work by renaming anaconda3\Library\mingw-w64\bin
to something else like bin-renamed
. Unfortunately, this would probably break any conda packages that rely on those versions of the libs.
I am going to do some more investigation and see if I can determine a clean list of troubleshooting steps which will allow for mingw installations in a conda environment but for now I think you have the following options:
C:\msys64\mingw64\bin
to your PATH and then install pyscamp in your conda environment by specifying set CMAKE_GENERATOR=MinGW Makefiles
, no need to specify the compilers, cmake should figure everything out. If after installation you are unable to import pyscamp due to a missing DLL, check your anaconda directory for anaconda3\Library\mingw-w64\bin
and try moving or renaming the directory temporarily.FYI I am hoping to list pyscamp on conda-forge soon, and hopfully doing this will make the windows install process more seamless.
@igrowing pyscamp is now available on conda-forge with native Windows binaries available.
You can install it via conda install -c conda-forge pyscamp-gpu
(you don't actually need a GPU to install/use this; it will try to use GPUs by default if it can find them and fall back to CPU if not)
Or if you only want CPU support conda install -c conda-forge pyscamp-cpu
Closing this now as the issue should be resolved. Let me know if you have any problems! Thanks!
Guys, please, help to resolve the problem. Windows 11. Anaconda 3. Installing pyscamp in venv of conda. See the failure below.
pip install cmake --upgrade
finished well. There is no nmake.exe file on the computer after the cmake install.Tried to use
set FORCE_NO_CUDA=1
- no luck. Triedset CC=C:\Users\user\anaconda3\Scripts\cmake.exe
andset CXX=C:\Users\user\anaconda3\Scripts\cmake.exe
- no luck. I see in docs that different compiler can be specified. What's recommended on Win11 system? Thanks!