I want to install tifffile package from terminal:
pip install tifffile
I am getting the following error
gcc -pthread -shared -L/home/l-01-314/anaconda3/lib -Wl,-rpath=/home/l-01-314/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.5/tifffile/_tifffile.o -L/home/l-01-314/anaconda3/lib -lpython3.5m -o build/lib.linux-x86_64-3.5/tifffile/_tifffile.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lpython3.5m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
any idea why I am getting this error ?
solved, there was a wrong link from system gcc so I installed gcc for python anaconda via conda.
conda install -c anaconda gcc=4.8.5
Related
I am trying to install qutip on a Mac (Catalina 10.15.6). I am using:
Python 3.8.3
Anaconda 4.8.4
I create a virtual environment with the command conda create -n qutip python=3.8 anaconda. Here's the error message:
g++ -bundle -undefined dynamic_lookup -
L/usr/local/anaconda3/envs/qutip/lib -arch x86_64 -L/usr/local/anaconda3/envs/qutip/lib -arch x86_64 /usr/local/opt/readline/include -arch x86_64 build/temp.macosx-10.9-x86_64-3.7/qutip/cy/spmatfuncs.o build/temp.macosx-10.9-x86_64-3.7/qutip/cy/src/zspmv.o -o build/lib.macosx-10.9-x86_64-3.7/qutip/cy/spmatfuncs.cpython-37m-darwin.so -mmacosx-version-min=10.9
ld: can't map file, errno=22 file '/usr/local/opt/readline/include' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for qutip
Failed to build qutip
ERROR: Could not build wheels for qutip which use PEP 517 and cannot be installed directly
I looked around and I don't see anything recent for this. I tried to install qutip from source and I got the same error. Does anyone have any thoughts? Thank you.
I am trying to install Numpy on a virtualenv python3.3. I followed this answer
but I eventually get the following error and the installation process terminates:
collect2: error: ld returned 1 exit status
error: Setup script exited with error: Command "/usr/bin/gfortran -Wall -Wall -shared build/temp.linux-i686-3.3/numpy/linalg/lapack_litemodule.o build/temp.linux-i686-3.3/numpy/linalg/lapack_lite/python_xerbla.o -L/usr/lib -Lbuild/temp.linux-i686-3.3 -llapack -lblas -lgfortran -o build/lib.linux-i686-3.3/numpy/linalg/lapack_lite.cpython-33m.so" failed with exit status 1
I also tried easy_install numpy and easy_install-3.3 numpy with no luck
Any advice?
Thanks
Im trying to install cx_Freeze for Python 3.3. However, when compiling the source I get this error
gcc -pthread build/temp.linux-i686-3.3/source/bases/Console.o -L/usr/local/lib/python3.3/config-3.3m -lpython3.3 -o build/lib.linux-i686-3.3/cx_Freeze/bases/Console -Xlinker -export-dynamic -lpthread -ldl -lutil -lm -s
/usr/bin/ld: cannot find -lpython3.3
collect2: error: ld returned 1 exit status
Since I'm a newbie I couldn't really figure out what's missing so I've tried installing libpython3.3-dev and python3.3-dev, but this doesn't solve the problem. I don't know if this is wheather a Python or gcc problem. What am I missing?
create link and it will be ok!
sudo ln /usr/local/lib/libpython3.3m.a /usr/local/lib/libpython3.3.a
I tried all answers but I can't solve the problem of installing Biopython package
I installed Mingw , but when I try to install the package : python setup.py install
I get the following error:
running install
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python33\include -Ic:\Pytho
n33\include -c Bio/cpairwise2module.c -o build\temp.win-amd64-3.3\Release\bio\cp
airwise2module.o
writing build\temp.win-amd64-3.3\Release\bio\cpairwise2.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-3.3\Release\bio
\cpairwise2module.o build\temp.win-amd64-3.3\Release\bio\cpairwise2.def -Lc:\Pyt
hon33\libs -Lc:\Python33\PCbuild\amd64 -lpython33 -lmsvcr100 -o build\lib.win-am
d64-3.3\Bio\cpairwise2.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: c:\Python3
3\libs/python33.lib(python33.dll): Recognised but unhandled machine type (0x8664
) in Import Library Format archive
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
d -lmsvcr100
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
According to here for error: cannot find -lmsvcr100 you need to first install Microsoft Visual C++ 2010 Redistributable Package, and second, copy the msvcr100.dll to C:\Python33\libs the directory for linking is C:\Python44\libs because both -lpython and -lmsvcr100 are pointed to the same location during compilation, and so they have to be in the same directory.` This solution worked for me when I needed to install Cython.
You will get two errors. The first is yours:
error: cannot find -lmsvcr100
error: command 'gcc' failed with exit status 1
Then you will get a second error after you solve the first one:
error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
They are two different errors with two different solutions. You can find more here.
I have tried lots of different guides.. this one gets me the furthest..
CFLAGS="$CFLAGS -lgcrypt -fPIC" STATIC_DEPS=true easy_install-2.6 lxml
however after installing all dependencies I get this error message over and over again:
install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib/pkgconfig"
/usr/bin/install -c -m 644 libxslt.m4 '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/share/aclocal'
/usr/bin/install -c -m 644 xsltConf.sh '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib'
/usr/bin/install -c -m 644 libxslt.pc libexslt.pc '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib/pkgconfig'
Building without Cython.
Using build configuration of libxml2 2.7.8 and libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
powerpc-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
powerpc-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccZA43Kh.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1
sh-3.2#
This worked for me:
sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml