ld: symbol(s) not found for architecture x86_64 on g95 - python

When I try to install the scipy I have got this error:
ld: symbol(s) not found for architecture x86_64
error: Command "/opt/local/bin/g95 -shared -shared build/temp.macosx-10.8-intel-2.7/build/src.macosx-10.8-intel-2.7/scipy/interpolate/src/dfitpackmodule.o build/temp.macosx-10.8-intel-2.7/build/src.macosx-10.8-intel-2.7/fortranobject.o build/temp.macosx-10.8-intel-2.7/build/src.macosx-10.8-intel-2.7/scipy/interpolate/src/dfitpack-f2pywrappers.o -Lbuild/temp.macosx-10.8-intel-2.7 -lfitpack -o build/lib.macosx-10.8-intel-2.7/scipy/interpolate/dfitpack.so" failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/scipy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-IUskjj-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/scipy
Storing complete log in /Users/MyUser/Library/Logs/pip.log
I installed the fortran compiler g95 using mac ports. Install using brew is not an option.
the command is:
sudo pip install scipy

Related

error: command 'gcc' failed with exit status 1 error

Hey there I'm currently trying to help a host resolve an issue. The issue we getting is error: command 'gcc' failed with exit status 1 we have tried installing the gcc compiler apt-get install python3-dev however it seems to be already installed.
Error:
I/usr/include/python3.7m -c multidict/_multidict.c -o build/temp.linux-x86_64-3.7/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-bu65o7vu/multidict/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-record-c0gfiuzu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-bu65o7vu/multidict/
You are using pip version 19.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Seán's Discord Bot:~/$
Weirdest t part is that gcc is installed
They use a container based system (docker) and need to find a way to implement it per-container.
Help would be much appreciated.

pycurl link error after upgrade from Yosemite to High Sierra

I just upgraded from Yosemite to High Sierra, which worked quite well, with the only exception that I have a bug in pycurl.
import pycurl
ImportError: No module named pycurl
so I did
pip uninstall pycurl
and
pip install --no-cache-dir --compile pycurl
but now it results in a clang error
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.10-x86_64-2.7/src/docstrings.o build/temp.macosx-10.10-x86_64-2.7/src/easy.o build/temp.macosx-10.10-x86_64-2.7/src/module.o build/temp.macosx-10.10-x86_64-2.7/src/multi.o build/temp.macosx-10.10-x86_64-2.7/src/oscompat.o build/temp.macosx-10.10-x86_64-2.7/src/pythoncompat.o build/temp.macosx-10.10-x86_64-2.7/src/share.o build/temp.macosx-10.10-x86_64-2.7/src/stringcompat.o build/temp.macosx-10.10-x86_64-2.7/src/threadsupport.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -lssl3 -lcurl -o build/lib.macosx-10.10-x86_64-2.7/pycurl.so
ld: library not found for -lssl3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-build-1rx5q1/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-MkzYNt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-build-1rx5q1/pycurl/
any idea what is going on here?
this fixed it...
export PYCURL_SSL_LIBRARY=openssl

Spacy can't be installed in virtualenv which is created with pypy

I created virtualenv(pypy as compiler).
Now when I tried to install Spacy using pip I get below error.
Failed to build spacy thinc
Installing collected packages: thinc, ujson, certifi, chardet, idna, urllib3, requests, regex, webencodings, html5lib, wcwidth, ftfy, spacy
Running setup.py install for thinc ... error
Complete output from command /Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc:
running install
running build
running build_py
running build_ext
building 'thinc.linalg' extension
gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -I/Users/azar-4893/Python_Venv/falconpypy/include -I/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/include -I/Users/azar-4893/Python_Venv/falconpypy/include -c thinc/linalg.cpp -o build/temp.macosx-10.11-x86_64-2.7/thinc/linalg.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: error: no such file or directory: 'thinc/linalg.cpp'
clang: error: no input files
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc" failed with error code 1 in /private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/
Is there a way to install spacy for pypy?
spacy uses a c-extensions module called thinc to do its heavy lifting in C. The latest PyPy cannot install thinc, there are multiple issues blocking its installation. Here is one on thinc, and this as yet unsupported call to PyFrozenSet_New in cytoolz
On MacOS, try this--
CFLAGS='-stdlib=libc++' pip install spacy==2.0.12 thinc==6.10.3 google-compute-engine https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_md-3.0.0/en_coref_md-3.0.0.tar.gz

Install big float on mac OS X

I am trying to install big float on OS X but i am encountering multiple issues.
I have installed amp without any problem, but when I have tried to install mpfr I got this error:
Warning: mpfr-3.1.5 already installed, it's just not linked.
What does this mean? (I am using Homebrew).
Then, obviously, if I try to install bigfloat it doesn't work and i get this error:
Collecting bigfloat
Downloading bigfloat-0.3.0.tar.gz (216kB)
100% |████████████████████████████████| 225kB 1.6MB/s
Installing collected packages: bigfloat
Running setup.py install for bigfloat ... error
Complete output from command /Users/name/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-VCyOBn/bigfloat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/include -L/usr/local/lib install --record /tmp/pip-K9AHsP-record/install-record.txt --single-version-externally-managed --compile:
running build_ext
building 'mpfr' extension
creating build
creating build/temp.macosx-10.7-x86_64-2.7
gcc -fno-strict-aliasing -I/Users/name/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/Users/name/anaconda2/include/python2.7 -c mpfr.c -o build/temp.macosx-10.7-x86_64-2.7/mpfr.o
In file included from /usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/syslimits.h:7:0,
from /usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/limits.h:34,
from /Users/name/anaconda2/include/python2.7/Python.h:19,
from mpfr.c:16:
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users//anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-VCyOBn/bigfloat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/include -L/usr/local/lib install --record /tmp/pip-K9AHsP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-VCyOBn/bigfloat/
You must install python-devel
In OS X try to uninstall and install again:
brew uninstall python
brew install python
Also according to this issue, Osx GCC (which is just a symlink to clang) doesn't ship with OpenMP support out of the box. You can install GCC with OpenMP.
brew install gcc --without-multilib

Install Fabric error in pyenv

I want use Fabric when I product my project in AWS Ubuntu. When I read about Fabric, it required python 2.5~2.7, so I create Python virtualenv on Mac OS X:
pyenv virtualenv 2.7.5 fabric
mkdir fabric
and I run pip install fabric
(fabric)fabric $ pip install fabric
but it has 2 errors
Collecting fabric
[...]
configure: creating ./config.status
config.status: creating src/config.h
building 'Crypto.PublicKey._fastmath' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/src
clang -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/Users/hanminsoo/.pyenv/versions/2.7.5/include/python2.7 -c
src/_fastmath.c -o build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o
src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
else if (result < 0)
~~~~~~ ^ ~
src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
else if (result < 0)
~~~~~~ ^ ~
2 warnings generated.
clang -bundle -bundle_loader python.exe -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/hanminsoo/.pyenv/versions/2.7.5/lib build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.11-x86_64-2.7/Crypto/PublicKey/_fastmath.so
ld: file not found: python.exe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
------------------------------------------------------
Failed building wheel for pycrypto
Running setup.py clean for pycrypto
Failed to build pycrypto
Installing collected packages: pycrypto, paramiko, fabric
Running setup.py install for pycrypto ... error
Complete output from command /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-iE2TRI-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/include/site/python2.7/pycrypto:
clang -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/Users/hanminsoo/.pyenv/versions/2.7.5/include/python2.7 -c src/_fastmath.c -o build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o
src/_fastmath.c:1545:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
else if (result < 0)
~~~~~~ ^ ~
src/_fastmath.c:1621:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
else if (result < 0)
~~~~~~ ^ ~
2 warnings generated.
clang -bundle -bundle_loader python.exe -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/Users/hanminsoo/.pyenv/versions/2.7.5/lib build/temp.macosx-10.11-x86_64-2.7/src/_fastmath.o -lgmp -o build/lib.macosx-10.11-x86_64-2.7/Crypto/PublicKey/_fastmath.so
ld: file not found: python.exe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
-------------------------------------------------------
Command "/Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-iE2TRI-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hanminsoo/.pyenv/versions/2.7.5/envs/fabric/include/site/python2.7/pycrypto" failed with error code 1 in /private/var/folders/c5/d1_cb4j92f19h5q0_cbv7bpc0000gn/T/pip-build-vsA2vJ/pycrypto/
Some people tell me "you should install pycrpto" so I install pycrpto
pip install pycrpto
but it has the same error when I pip install fabric. I found this solution link, so I run:
brew install gmp
export LIBRARY_PATH=/usr/local/lib
pip install pycrypto
but it has the same error and second solution is link
$ bunzip2 gmp-5.0.5.tar.bz2
but it has another error:
bunzip2: Can't open input file gmp-5.0.5.tar.bz2: No such file or directory.
I can't understand why fabric doesn't install...
It's a bug in Python <2.7.8. See pyenv#273.
You can fix it by patching _sysconfigdata.py:
$ export p=/Users/andrei/.pyenv/versions/2.7.6
$ sed -i -e "s#python.exe#${p}/bin/python2.7#g" "$p/lib/python2.7/_sysconfigdata.py"

Categories