Closed robcca closed 5 years ago
@RobertCardwell
Failed to build gmpy
It was an error of installing a pip module gmpy
, so It's unrelated to primefac-fork.
It seems like you didn't installed libgmp-dev
.
If gmpy is a dependency, why isn't it included in the installation process like the other dependencies? Where does it say I have to install gmpy manually?
@RobertCardwell
gmpy
module has native codes, and it needs to compiling it (the error occurred at compiling process of the module). primefac-fork's dependencies list has the module already.
Python's dependencies requirements can contain installing module
operation, but installing package to compile native codes of module
operation can't. so you can install the module correctly, if you've installed Package for compiling gmpy's native codes
.
Thank you for your detailed response. I have now successfully installed it. I still feel that such a requirement it might be documented a bit better.
On both WSL (Ubuntu on Windows) and on a Debian 9 machine I'm getting the same error messages when I run the pip install command (output below). This is pip 9.0.1 and python 3.6
user@user-PC: ~ $ pip install git+git://github.com/elliptic-shiho/primefac-fork@master Collecting git+git://github.com/elliptic-shiho/primefac-fork@master Cloning git://github.com/elliptic-shiho/primefac-fork (to master) to /tmp/pip-0zbeh4lu-build Collecting factordb-pycli (from primefac==1.1.1) Collecting gmpy (from primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/26/37/2184c13cee81e1dbeaebbb13570195247e73ab2138a3db0c9d2c5347e372/gmpy-1.17.zip Collecting six (from primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Collecting requests (from factordb-pycli->primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl Collecting chardet<3.1.0,>=3.0.2 (from requests->factordb-pycli->primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl Collecting idna<2.9,>=2.5 (from requests->factordb-pycli->primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->factordb-pycli->primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests->factordb-pycli->primefac==1.1.1) Using cached https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl Building wheels for collected packages: gmpy Running setup.py bdist_wheel for gmpy ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-aza6vcq5/gmpy/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 /tmp/tmp8b8c78hvpip-wheel- --python-tag cp36: running bdist_wheel running build running build_ext building 'gmpy' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./src -I/usr/include/python3.6m -c src/gmpy.c -o build/temp.linux-x86_64-3.6/src/gmpy.o In file included from src/gmpy.c:251:0: src/gmpy.h:30:10: fatal error: gmp.h: No such file or directory
include "gmp.h"
compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for gmpy Running setup.py clean for gmpy Failed to build gmpy Installing collected packages: chardet, idna, urllib3, certifi, requests, factordb-pycli, gmpy, six, primefac Running setup.py install for gmpy ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-aza6vcq5/gmpy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-yy0dx8zo-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build running build_ext building 'gmpy' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./src -I/usr/include/python3.6m -c src/gmpy.c -o build/temp.linux-x86_64-3.6/src/gmpy.o In file included from src/gmpy.c:251:0: src/gmpy.h:30:10: fatal error: gmp.h: No such file or directory
include "gmp.h"
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-aza6vcq5/gmpy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-yy0dx8zo-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-aza6vcq5/gmpy/