Unable to "install numpy installation" on a specific machine

pip install numpy in the python virtual machine on my Mac OSX machine, and on my other machine running Arch Linux it works fine.

Unfortunately, the same command does not work on a colleague's computer working with Gentoo.

Here pip.log shows the error logs: -

building data_files sources

build_src: building npy-pkg config files

running build_py

copying numpy/version.py -> build/lib.linux-x86_64-2.7/numpy

copying build/src.linux-x86_64-2.7/numpy/__config__.py -> build/lib.linux-x86_64-2.7/numpy

copying build/src.linux-x86_64-2.7/numpy/distutils/__config__.py -> build/lib.linux-x86_64-2.7/numpy/distutils

running build_clib

customize UnixCCompiler

customize UnixCCompiler using build_clib

running build_ext

customize UnixCCompiler

customize UnixCCompiler using build_ext

customize GnuFCompiler

customize IntelFCompiler

customize LaheyFCompiler

customize PGroupFCompiler

customize AbsoftFCompiler

customize NAGFCompiler

customize VastFCompiler

customize CompaqFCompiler

customize IntelItaniumFCompiler

customize IntelEM64TFCompiler

customize Gnu95FCompiler

customize Gnu95FCompiler

customize Gnu95FCompiler using build_ext

building 'numpy.linalg.lapack_lite' extension

compiling C sources

C compiler: x86_64-pc-linux-gnu-gcc -pthread -O3 -march=native -pipe -fomit-frame-pointer -fno-ident -fPIC



compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c'

x86_64-pc-linux-gnu-gcc: numpy/linalg/lapack_litemodule.c

x86_64-pc-linux-gnu-gcc: numpy/linalg/python_xerbla.c

/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so

/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':

(.text+0x20): undefined reference to `main'

collect2: ld returned 1 exit status

/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':

(.text+0x20): undefined reference to `main'

collect2: ld returned 1 exit status

error: Command "/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1

----------------------------------------

Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy

Exception information:
Traceback (most recent call last):
  File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run
    requirement_set.install(install_options, global_options)
  File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install
    requirement.install(install_options, global_options)
  File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy

It seems that gfortran on my colleague is not playing well with the numpy package that he is trying to install in virtualenv. Any idea why this could be so?

+5
source share
2 answers

If installed CFLAGS, CXXFLAGSor LDFLAGS, this can lead to this. The problem is that these environment variables override the settings in the compilation script, causing problems.

pip, .

+7

, setuptools , setuptools "dist" python, .

0

All Articles