我使用virtualenv来初始化没有站点包的python环境。但我无法使用pip在环境中安装软件包。例如,当我命令:
pip install numpy
有很多这样的警告:
compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=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/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -c'
gcc: numpy/core/src/dummymodule.c
gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/numpy/core/src/dummymodule.o -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/numpy/core/_dummy.so
building 'numpy.core.multiarray' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -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/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -c'
gcc: numpy/core/src/multiarray/compiled_base.c
gcc: numpy/core/src/multiarray/sequence.c
gcc: numpy/core/src/multiarray/descriptor.c
gcc: numpy/core/src/multiarray/getset.c
gcc: numpy/core/src/multiarray/arrayobject.c
gcc: numpy/core/src/private/ufunc_override.c
gcc: numpy/core/src/multiarray/methods.c
gcc: numpy/core/src/multiarray/datetime_busdaycal.c
gcc: numpy/core/src/multiarray/vdot.c
gcc: numpy/core/src/multiarray/array_assign_array.c
它太长了我几乎无法复制所有这些信息。
有一些想法吗?非常感谢!
答案 0 :(得分:1)
尝试安装gcc
关于ubuntu / debian:
sudo apt-get install gcc
关于centos / redhat / fedora:
yum install gcc