Having difficulty on Python 3.5.2, macOS Sierra.
See original GitHub issueHowdy!
I’m having some trouble installing fastecdsa
on Python 3.5.2, installed via the official packages, with homebrew-supplied libgmp
.
In a fresh virtual environment, pip install fastecdsa
explodes gloriously:
Collecting fastecdsa
Using cached fastecdsa-1.1.3.tar.gz
Installing collected packages: fastecdsa
Running setup.py install for fastecdsa ... error
Complete output from command /Users/amcgregor/Projects/test/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/xp/zg8pvtm16tl_tx4fp4sthm7c0000gn/T/pip-build-1nokhsj2/fastecdsa/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xp/zg8pvtm16tl_tx4fp4sthm7c0000gn/T/pip-ahgmwxsn-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/amcgregor/Projects/test/.venv/include/site/python3.5/fastecdsa:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/__init__.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/curve.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/ecdsa.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/keys.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/test.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
copying fastecdsa/util.py -> build/lib.macosx-10.6-intel-3.5/fastecdsa
running build_ext
building 'fastecdsa.curvemath' extension
creating build/temp.macosx-10.6-intel-3.5
creating build/temp.macosx-10.6-intel-3.5/src
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Isrc/ -I/Users/amcgregor/Projects/test/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c src/curveMath.c -o build/temp.macosx-10.6-intel-3.5/src/curveMath.o -O2
In file included from src/curveMath.c:1:
src/curveMath.h:10:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Users/amcgregor/Projects/test/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/xp/zg8pvtm16tl_tx4fp4sthm7c0000gn/T/pip-build-1nokhsj2/fastecdsa/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xp/zg8pvtm16tl_tx4fp4sthm7c0000gn/T/pip-ahgmwxsn-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/amcgregor/Projects/test/.venv/include/site/python3.5/fastecdsa" failed with error code 1 in /private/var/folders/xp/zg8pvtm16tl_tx4fp4sthm7c0000gn/T/pip-build-1nokhsj2/fastecdsa/
With --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib"
in there, we get further:
/Users/amcgregor/Projects/test/.venv/lib/python3.5/site-packages/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Collecting fastecdsa
Using cached fastecdsa-1.1.3.tar.gz
Installing collected packages: fastecdsa
Running setup.py install for fastecdsa ... done
Successfully installed fastecdsa-1.1.3
pip install --global-option=build_ext --global-option="-I/usr/local/include" 1.60s user 0.67s system 91% cpu 2.480 total
However, when running python -c "from fastecdsa import curve, ecdsa, keys"
:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/amcgregor/Projects/test/.venv/lib/python3.5/site-packages/fastecdsa/curve.py", line 1, in <module>
from fastecdsa import curvemath
ImportError: dlopen(/Users/amcgregor/Projects/test/.venv/lib/python3.5/site-packages/fastecdsa/curvemath.cpython-35m-darwin.so, 2): Symbol not found: _Py_InitModule4_64
Referenced from: /Users/amcgregor/Projects/test/.venv/lib/python3.5/site-packages/fastecdsa/curvemath.cpython-35m-darwin.so
Expected in: flat namespace
in /Users/amcgregor/Projects/test/.venv/lib/python3.5/site-packages/fastecdsa/curvemath.cpython-35m-darwin.so
What might be going on here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Getting this error when running python 3 version on macOS ...
It looks like you are using the python of the system. I am myself on macOS and I went crazy several times with...
Read more >unexpected quitting of python 3.5 - Apple Support Communities
I'm mew to MacOS Sierra. I have installed python 3.5 on my Mac. I'm getting an unexpected quitting error as soon I use...
Read more >Python Releases for macOS
Stable Releases. Python 3.11.1 - Dec. 6, 2022. Download macOS 64-bit universal2 installer · Python 3.10.9 - Dec. 6, 2022. Download macOS 64-bit...
Read more >pyCharm writes "python version 2.7 doesn't have module ...
pyCharm writes "python version 2.7 doesn't have module pathlib" while project interpreter is set to 3.5.2. (mac os high sierra) Follow.
Read more >Installing on macOS - Anaconda Documentation
If you have already purchased Professional, please proceed to the Authenticating ... Download the graphical macOS installer for your version of Python.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just pushed some changes for python3 compatibility, I tested them in a virtualenv using python3.4 and they cleared the test suite. Haven’t benchmarked performance but I see no reason it would be much different from the python2 performance. Let me know if you’re still having trouble (
$ pip install fastecdsa==1.2.1
should do the trick).Happy to hear that did the trick for you! 😃
[for historical reference issue fixed in 3c2162c]