Skip to content
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

Installing error on windows #136

Closed
brunolealdias opened this issue Dec 27, 2021 · 17 comments
Closed

Installing error on windows #136

brunolealdias opened this issue Dec 27, 2021 · 17 comments

Comments

@brunolealdias
Copy link

brunolealdias commented Dec 27, 2021

Hello! I'm trying to install the package and I'm getting this error (It seems a problem during the installation of one of the needed packages LSSTDESC.Coord. I already tried unistalling anaconda and python and reinstalling as some people suggested, but I still getting the same error. I would really apreciate if someone could help me to solve it):

C:\Users\bareb>pip install treecorr --user
Collecting treecorr
Using cached TreeCorr-4.2.6.tar.gz (793 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\bareb\appdata\local\programs\python\python310\lib\site-packages (from treecorr) (1.21.5)
Requirement already satisfied: cffi in c:\users\bareb\appdata\local\programs\python\python310\lib\site-packages (from treecorr) (1.15.0)
Requirement already satisfied: pyyaml in c:\users\bareb\appdata\local\programs\python\python310\lib\site-packages (from treecorr) (6.0)
Collecting LSSTDESC.Coord>=1.1
Using cached LSSTDESC.Coord-1.2.2.tar.gz (49 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: future in c:\users\bareb\appdata\local\programs\python\python310\lib\site-packages (from LSSTDESC.Coord>=1.1->treecorr) (0.18.2)
Requirement already satisfied: pycparser in c:\users\bareb\appdata\local\programs\python\python310\lib\site-packages (from cffi->treecorr) (2.21)
Using legacy 'setup.py install' for treecorr, since package 'wheel' is not installed.
Using legacy 'setup.py install' for LSSTDESC.Coord, since package 'wheel' is not installed.
Installing collected packages: LSSTDESC.Coord, treecorr
Running setup.py install for LSSTDESC.Coord ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\bareb\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bareb\AppData\Local\Temp\pip-install-6pv18u3v\lsstdesc-coord_2ee88310019744bf85015c3514aefb7d\setup.py'"'"'; file='"'"'C:\Users\bareb\AppData\Local\Temp\pip-install-6pv18u3v\lsstdesc-coord_2ee88310019744bf85015c3514aefb7d\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\bareb\AppData\Local\Temp\pip-record-wdt0a6ry\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\bareb\AppData\Roaming\Python\Python310\Include\LSSTDESC.Coord'
cwd: C:\Users\bareb\AppData\Local\Temp\pip-install-6pv18u3v\lsstdesc-coord_2ee88310019744bf85015c3514aefb7d
Complete output (29 lines):
Python version = 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]
sources = ['src\Angle.cpp']
headers = ['include\Angle_C.h']
Coord version is 1.2.2
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\coord
copying coord\angle.py -> build\lib.win-amd64-3.10\coord
copying coord\angleunit.py -> build\lib.win-amd64-3.10\coord
copying coord\celestial.py -> build\lib.win-amd64-3.10\coord
copying coord\util.py -> build\lib.win-amd64-3.10\coord
copying coord_version.py -> build\lib.win-amd64-3.10\coord
copying coord_init_.py -> build\lib.win-amd64-3.10\coord
creating build\lib.win-amd64-3.10\coord\include
copying coord\include\Angle_C.h -> build\lib.win-amd64-3.10\coord\include
running build_ext
building 'coord._coord' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Iinclude -IC:\Users\bareb\AppData\Local\Programs\Python\Python310\include -IC:\Users\bareb\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpsrc\Angle.cpp /Fobuild\temp.win-amd64-3.10\Release\src\Angle.obj
Angle.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\bareb\AppData\Local\Programs\Python\Python310\libs /LIBPATH:C:\Users\bareb\AppData\Local\Programs\Python\Python310\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 /EXPORT:PyInit__coord build\temp.win-amd64-3.10\Release\src\Angle.obj /OUT:build\lib.win-amd64-3.10\coord_coord.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\src_coord.cp310-win_amd64.lib
LINK : error LNK2001: s¡mbolo externo nÆo resolvido PyInit__coord
build\temp.win-amd64-3.10\Release\src_coord.cp310-win_amd64.lib : fatal error LNK1120: 1 externo nÆo resolvidos
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\bareb\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bareb\AppData\Local\Temp\pip-install-6pv18u3v\lsstdesc-coord_2ee88310019744bf85015c3514aefb7d\setup.py'"'"'; file='"'"'C:\Users\bareb\AppData\Local\Temp\pip-install-6pv18u3v\lsstdesc-coord_2ee88310019744bf85015c3514aefb7d\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\bareb\AppData\Local\Temp\pip-record-wdt0a6ry\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\bareb\AppData\Roaming\Python\Python310\Include\LSSTDESC.Coord' Check the logs for full command output.

@rmjarvis
Copy link
Owner

Sorry, I don't have access to any Windows machines, so I don't really have a way to troubleshoot this. Maybe try conda install treecorr rather than use pip. Otherwise, I'm afraid I can't really help you.

@brunolealdias
Copy link
Author

brunolealdias commented Dec 28, 2021

I've tried all suggested ways of installing it and I still getting the same error. I've also tried to install the package LSSTDESC.Coord alone and I get the same error.

Anyways, I appreciate your attention.

@jilavsky
Copy link

Same issue here. conda-org does not have windows package and all other methods of installation fail with the error above. This is error from installation of dependency - LSSTDESC.Coord - package. It would be great if someone with more experience could test Windows installation and figure out why we cannot install this.

@rmjarvis
Copy link
Owner

I'd be happy to take a PR from someone who can fix this. But I don't have access to a Windows machine to work on it myself.

@rmjarvis
Copy link
Owner

Note also, that the right place for this issue (and any concomitant PR) appears to be on LSSTDESC.Coord, not TreeCorr. https://github.com/LSSTDESC/Coord

@rmjarvis
Copy link
Owner

I've been slowly tinkering on this using the GitHub actions machines to test the Windows installation and running. I think things are working now.

If you want to try it out, use pip install git+https://github.com/rmjarvis/TreeCorr.git@windows and let me know if everything seems to be working. If it works for you, these changes will become part of the next regular release.

cf. #143 for more details if you're interested.

@brunolealdias
Copy link
Author

brunolealdias commented May 29, 2022 via email

@rmjarvis
Copy link
Owner

rmjarvis commented May 29, 2022 via email

@brunolealdias
Copy link
Author

brunolealdias commented May 31, 2022 via email

@rmjarvis
Copy link
Owner

OK. So did you try upgrading your build tools, like it said? I believe GitHub's machine is using 14.32.31326. cf. https://github.com/rmjarvis/TreeCorr/runs/6616992268?check_suite_focus=true

@brunolealdias
Copy link
Author

brunolealdias commented May 31, 2022 via email

@rmjarvis
Copy link
Owner

rmjarvis commented Jun 1, 2022

I can't help you with installing things on Windows. I just know that it worked using the GitHub Actions "windows-latest" system, which as far as I can tell seems to be using build tools 14.32.31326. So if you can manage to install that, then I think it should work. This applies to both Coord and TreeCorr.

@brunolealdias
Copy link
Author

brunolealdias commented Jun 1, 2022 via email

@brunolealdias
Copy link
Author

brunolealdias commented Jun 1, 2022 via email

@brunolealdias
Copy link
Author

brunolealdias commented Jun 1, 2022 via email

@rmjarvis
Copy link
Owner

rmjarvis commented Jun 1, 2022

Great! Thanks for following up with this. Once I release an official version 4.3.0, you shouldn't need the git+ thing. It should just work with the regular pip install treecorr command.

@brunolealdias
Copy link
Author

brunolealdias commented Jun 1, 2022 via email

@rmjarvis rmjarvis added this to the Version 4.3 milestone Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants