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
Related
I am super desperate...I am using Ubuntu 18.04.3 LTS
For a robotics class I had to build their project (after cloning it from git) with the make command. After some time i am receiving the following:enter image description here
(...)
make[1]: Entering directory '/home/fia/robotics-course/rai/rai/ry'
* UpToDate ../../rai/Kin/libKin.so
* UpToDate ../../rai/Core/libCore.so
* UpToDate ../../rai/KOMO/libKOMO.so
* UpToDate ../../rai/LGP/libLGP.so
g++ -g -march=native -Wall -DRAI_PYBIND `python3-config --cflags` -Wno-terminate -fPIC -std=c++14 -o lgp-py.o -c lgp-py.cpp
* UpToDate ../../rai/Operate/libOperate.so
g++ -g -march=native -Wall -DRAI_PYBIND `python3-config --cflags` -Wno-terminate -fPIC -std=c++14 -o ry.o -c ry.cpp
* UpToDate ../../rai/Perception/libPerception.so
* UpToDate ../../rai/RosCom/libRosCom.so
g++ -L/home/fia/robotics-course/rai/lib -L/usr/local/lib -o libry.so ./lgp-py.o ./ry.o -lCore -lKin -lKOMO -lLGP -lOperate -lRosCom -lPerception `python3-config --ldflags` -lrt -shared
lto1: internal compiler error: in lto_tag_to_tree_code, at lto-streamer.h:1005
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
../../build/generic.mk:299: recipe for target 'libry.so' failed
make[1]: *** [libry.so] Error 1
make[1]: Target 'default' not remade because of errors.
make[1]: Leaving directory '/home/fia/robotics-course/rai/rai/ry'
***** FAILED rai/rai/ry/libry.so
I am assuming that the line "internal compiler error" shows me whats wrong but I can not figure out how to solve it... I re-installed g++ and also redownloaded the git repository several times but nothing seems to work. I already thought that maybe me Operating System has a problem?
I already thought about reistalling Ubuntu...
So if anyone has an idea i would be super thankful!
Regards
Fia
"Internal compiler error" sounds like there's a bug in the compiler, so here are some ideas to try to work around it.
You could try compiling it with clang++ instead of g++. Install it using:
sudo apt-get install clang
Then build using something like:
CC=clang CXX=clang++ LD=clang make
Because the error mentions lto, you could also turning link-time optimization off:
LDFLAGS=-fno-lto make
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
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 have build the gmp 5.1.1 library using gcc 4.7.2 all in the Windows-7 environment.
I configured the build with ./configure and commanded the make and after finished the
make check without any errors.
However, when I put the resulting libgmp.a into the Python33/libs and lunch the
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
the following errors reporting incompatibility for libgmp.a occur:
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
C:\MinGW64\bin\gcc.exe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/
-Ic:\Python33\include -Ic:\Python33\include -c src/_fastmath.c -o build\temp.win
-amd64-3.3\Release\src\_fastmath.o
writing build\temp.win-amd64-3.3\Release\src\_fastmath.def
C:\MinGW64\bin\gcc.exe -shared -Wl,--enable-auto-image-base -s build\temp.win-am
d64-3.3\Release\src\_fastmath.o build\temp.win-amd64-3.3\Release\src\_fastmath.d
ef -Lc:\Python33\libs -Lc:\Python33\PCbuild\amd64 -lgmp -lpython33 -lmsvcr100 -o
build\lib.win-amd64-3.3\Crypto\PublicKey\_fastmath.pyd
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs\libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Please any suggestions ? Thanks.
-- Giorgio
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Installing SciPy with pip
I want to install a new version of SciPy which is 0.11.0 and the current version which I have is 0.9.0.
It is installed by this command:
sudo apt-get install python-scipy
I have tried installing 0.11.0 from sources, but I could not.
Is there already an apt-get for 0.11.0?
EDIT 1
Following is the error when I build from source or do an easy install.
Setup script exited with error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared
build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.o
build/temp.linux-x86_64-2.7/scipy/fftpack/src/zfft.o build/temp.linux-x86_64-
2.7/scipy/fftpack/src/drfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o
build/temp.linux-x86_64-2.7/scipy/fftpack/src/zfftnd.o build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/scipy/fftpack/src/dct.o build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/fortranobject.o -Lbuild/temp.linux-x86_64-2.7 -
ldfftpack -lfftpack -lg2c -o build/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so"
failed with exit status 1
/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py:251: RuntimeWarning: Parent
module 'numpy.distutils' not found while handling absolute import
from numpy.distutils import log
EDIT 2
That issue has been resolved, and the error is now the following.
gcc: build/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.c
/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.7/build/src.linux-
x86_64-2.7/scipy/fftpack/_fftpackmodule.o build/temp.linux-x86_64-
2.7/scipy/fftpack/src/zfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/drfft.o
build/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o build/temp.linux-x86_64-
2.7/scipy/fftpack/src/zfftnd.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-
2.7/scipy/fftpack/src/dct.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-
2.7/scipy/fftpack/src/dst.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-
2.7/fortranobject.o -Lbuild/temp.linux-x86_64-2.7 -ldfftpack -lfftpack -lg2c -o
build/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.o build/temp.linux-
x86_64-2.7/scipy/fftpack/src/zfft.o build/temp.linux-x86_64-
2.7/scipy/fftpack/src/drfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o
build/temp.linux-x86_64-2.7/scipy/fftpack/src/zfftnd.o build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/scipy/fftpack/src/dct.o build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/scipy/fftpack/src/dst.o build/temp.linux-x86_64-
2.7/build/src.linux-x86_64-2.7/fortranobject.o -Lbuild/temp.linux-x86_64-2.7 -
ldfftpack -lfftpack -lg2c -o build/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so"
failed with exit status 1
EDIT 3
I have asked this question [here], but the issue is not solved yet.
Any thoughts?
If you have all the basic prerequisites installed as described in the INSTALL.txt file, it should be fairly straightforward by doing a:
sudo python setupy.py install
from within the directory where you extracted the scipy0.11.0 tarball. This should make the library inside your current default Python version.
You can check whether you have the prerequisites by just running:
sudo apt-get install python python-dev libatlas3-base-dev gcc gfortran g++
as explained again in the INSTALL.TXT.