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

Problem about install Genice package_pairlist package can not be installed #7

Closed
ChengyangYuan opened this issue Jun 5, 2020 · 2 comments

Comments

@ChengyangYuan
Copy link

Dear Professor Masakazu Matsumoto

First Thank you so much to develop such a package to generate ice structure. It is very helpful for people who wants to do some work about simulations on clathrate hydrates and ice lattices, especially for me, a complete beginner.

But actually I have some trouble at the very beginning, that is to install the GenIce package on my computer (Window 10). I use Python 3.5, "pip3 install GenIce", and everything is Ok, but the package " Pairlist "that GenIce needed can not be installed successfully. I try my best to Google the issue and find the possible answer, but failed. I dont know where I was wrong. Is it the problem of the environment of my computer, or something else?

Thank you for taking your time and hope your valuable advice.

ps: i guess that using the pairlist. whl to install is a solver, but i see on https://pypi.org/ there is only .whl for macosx. no a window type.

Here is the Error information when i installed GenIce:


(python35) C:\Users\Administrator>pip install GenIce
Collecting GenIce
Using cached GenIce-1.0.10-py2.py3-none-any.whl (696 kB)
Requirement already satisfied: countrings>=0.1.7 in d:\ana\envs\python35\lib\site-packages (from GenIce) (0.1.7)
Requirement already satisfied: numpy in d:\ana\envs\python35\lib\site-packages (from GenIce) (1.13.1)
Collecting pairlist>=0.2.3
Using cached PairList-0.2.9.tar.gz (8.9 kB)
Requirement already satisfied: networkx>=2 in d:\ana\envs\python35\lib\site-packages (from GenIce) (2.4)
Requirement already satisfied: yaplotlib>=0.1 in d:\ana\envs\python35\lib\site-packages (from GenIce) (0.1.2)
Requirement already satisfied: methodtools in d:\ana\envs\python35\lib\site-packages (from countrings>=0.1.7->GenIce) (0.1.3)
Requirement already satisfied: decorator>=4.3.0 in d:\ana\envs\python35\lib\site-packages (from networkx>=2->GenIce) (4.4.2)
Requirement already satisfied: wirerope==0.3.1 in d:\ana\envs\python35\lib\site-packages (from methodtools->countrings>=0.1.7->GenIce) (0.3.1)
Requirement already satisfied: six>=1.11.0 in d:\ana\envs\python35\lib\site-packages (from wirerope==0.3.1->methodtools->countrings>=0.1.7->GenIce) (1.15.0)
Building wheels for collected packages: pairlist
Building wheel for pairlist (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'd:\ana\envs\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"'; file='"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\ADMINI1\AppData\Local\Temp\pip-wheel-cfc2e980'
cwd: C:\Users\ADMINI
1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist
Complete output (56 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
copying pairlist.py -> build\lib.win-amd64-3.5
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'cpairlist' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tccpairlist.c /Fobuild\temp.win-amd64-3.5\Release\cpairlist.obj -std=c99
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
pairlist.c
pairlist.c: warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
pairlist.c(106): error C2057: expected constant expression
pairlist.c(106): error C2466: cannot allocate an array of constant size 0
pairlist.c(106): error C2133: 'nResidents': unknown size
pairlist.c(114): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(122): error C2057: expected constant expression
pairlist.c(122): error C2466: cannot allocate an array of constant size 0
pairlist.c(122): error C2133: 'residents': unknown size
pairlist.c(123): error C2057: expected constant expression
pairlist.c(123): error C2466: cannot allocate an array of constant size 0
pairlist.c(123): error C2133: 'heads': unknown size
pairlist.c(124): error C2057: expected constant expression
pairlist.c(124): error C2466: cannot allocate an array of constant size 0
pairlist.c(124): error C2133: 'pointer': unknown size
pairlist.c(137): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(245): error C2057: expected constant expression
pairlist.c(245): error C2466: cannot allocate an array of constant size 0
pairlist.c(245): error C2133: 'nResidents0': unknown size
pairlist.c(246): error C2057: expected constant expression
pairlist.c(246): error C2466: cannot allocate an array of constant size 0
pairlist.c(246): error C2133: 'nResidents1': unknown size
pairlist.c(256): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(268): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(279): error C2057: expected constant expression
pairlist.c(279): error C2466: cannot allocate an array of constant size 0
pairlist.c(279): error C2133: 'pointer': unknown size
pairlist.c(282): error C2057: expected constant expression
pairlist.c(282): error C2466: cannot allocate an array of constant size 0
pairlist.c(282): error C2133: 'residents0': unknown size
pairlist.c(283): error C2057: expected constant expression
pairlist.c(283): error C2466: cannot allocate an array of constant size 0
pairlist.c(283): error C2133: 'heads0': unknown size
pairlist.c(297): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(303): error C2057: expected constant expression
pairlist.c(303): error C2466: cannot allocate an array of constant size 0
pairlist.c(303): error C2133: 'residents1': unknown size
pairlist.c(304): error C2057: expected constant expression
pairlist.c(304): error C2466: cannot allocate an array of constant size 0
pairlist.c(304): error C2133: 'heads1': unknown size
pairlist.c(321): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99" failed with exit status 2

ERROR: Failed building wheel for pairlist
Running setup.py clean for pairlist
Failed to build pairlist
Installing collected packages: pairlist, GenIce
Running setup.py install for pairlist ... error
ERROR: Command errored out with exit status 1:
command: 'd:\ana\envs\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"'; file='"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI1\AppData\Local\Temp\pip-record-2s0kfk7e\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\ana\envs\python35\Include\pairlist'
cwd: C:\Users\ADMINI
1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist
Complete output (56 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
copying pairlist.py -> build\lib.win-amd64-3.5
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'cpairlist' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tccpairlist.c /Fobuild\temp.win-amd64-3.5\Release\cpairlist.obj -std=c99
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
pairlist.c
pairlist.c: warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
pairlist.c(106): error C2057: expected constant expression
pairlist.c(106): error C2466: cannot allocate an array of constant size 0
pairlist.c(106): error C2133: 'nResidents': unknown size
pairlist.c(114): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(122): error C2057: expected constant expression
pairlist.c(122): error C2466: cannot allocate an array of constant size 0
pairlist.c(122): error C2133: 'residents': unknown size
pairlist.c(123): error C2057: expected constant expression
pairlist.c(123): error C2466: cannot allocate an array of constant size 0
pairlist.c(123): error C2133: 'heads': unknown size
pairlist.c(124): error C2057: expected constant expression
pairlist.c(124): error C2466: cannot allocate an array of constant size 0
pairlist.c(124): error C2133: 'pointer': unknown size
pairlist.c(137): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(245): error C2057: expected constant expression
pairlist.c(245): error C2466: cannot allocate an array of constant size 0
pairlist.c(245): error C2133: 'nResidents0': unknown size
pairlist.c(246): error C2057: expected constant expression
pairlist.c(246): error C2466: cannot allocate an array of constant size 0
pairlist.c(246): error C2133: 'nResidents1': unknown size
pairlist.c(256): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(268): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(279): error C2057: expected constant expression
pairlist.c(279): error C2466: cannot allocate an array of constant size 0
pairlist.c(279): error C2133: 'pointer': unknown size
pairlist.c(282): error C2057: expected constant expression
pairlist.c(282): error C2466: cannot allocate an array of constant size 0
pairlist.c(282): error C2133: 'residents0': unknown size
pairlist.c(283): error C2057: expected constant expression
pairlist.c(283): error C2466: cannot allocate an array of constant size 0
pairlist.c(283): error C2133: 'heads0': unknown size
pairlist.c(297): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
pairlist.c(303): error C2057: expected constant expression
pairlist.c(303): error C2466: cannot allocate an array of constant size 0
pairlist.c(303): error C2133: 'residents1': unknown size
pairlist.c(304): error C2057: expected constant expression
pairlist.c(304): error C2466: cannot allocate an array of constant size 0
pairlist.c(304): error C2133: 'heads1': unknown size
pairlist.c(321): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\ana\envs\python35\lib\site-packages\numpy\core\include -Id:\ana\envs\python35\include -Id:\ana\envs\python35\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcpairlist.c /Fobuild\temp.win-amd64-3.5\Release\pairlist.obj -std=c99" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\ana\envs\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"'; file='"'"'C:\Users\ADMINI1\AppData\Local\Temp\pip-install-k93z0ykf\pairlist\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-2s0kfk7e\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\ana\envs\python35\Include\pairlist' Check the logs for full command output.

@ChengyangYuan
Copy link
Author

Thanks for suggestions from the professor Masakazu Matsumoto. The Error is from the wrong VC compiler environment. When I installed the gcc environment, that is mingW64, and then added an file named "distutils.cfg" in the file folder : D:\Ana\envs\python35\Lib\distutils. (where is your python installed). The file content is :
[build]
compiler = mingw32

Then you can install the GenIce successfully now.

@vitroid
Copy link
Owner

vitroid commented Jun 7, 2020

I modified the c code not to use vla (variable length array on the stack memory) for microsoft c compilers and released as v0.2.10. Now it is also available from PyPI.

FYI, I installed the Build Tools for Visual Studio 2019, which is deeply hidden in this page: https://visualstudio.microsoft.com/downloads

@vitroid vitroid closed this as completed Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants