我正在尝试使用C扩展文件构建共享库,但首先我必须使用以下命令生成输出文件:
gcc -Wall utilsmodule.c -o Utilc
Run Code Online (Sandbox Code Playgroud)
执行命令后,我收到此错误消息:
utilsmodule.c:1:20:致命错误:Python.h:没有这样的文件或目录编译终止.
事实上我已经通过互联网尝试了所有建议的解决方案,但问题仍然存在...我也没有问题Python.h.我设法在我的机器上找到该文件......任何人在遇到同样的问题之前?
我正在尝试在我正在分发的包中创建所需的库.它需要SciPy和NumPy库.在开发过程中,我安装了两个
apt-get install scipy
Run Code Online (Sandbox Code Playgroud)
安装了SciPy 0.9.0和NumPy 1.5.1,它运行良好.
我想使用相同的方法pip install- 以便能够在我自己的包的setup.py中指定依赖项.
问题是,当我尝试:
pip install 'numpy==1.5.1'
Run Code Online (Sandbox Code Playgroud)
它工作正常.
但是之后
pip install 'scipy==0.9.0'
Run Code Online (Sandbox Code Playgroud)
惨遭失败
raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
Run Code Online (Sandbox Code Playgroud)
我如何让它工作?
我目前正在按照教程安装SciPy Stack在Ubuntu 12.04(精确穿山甲)上安装SciPy(我不能使用apt-get install因为我需要最新版本).
但是,当我执行以下命令时出现错误:
python setup.py build
sudo python setup.py install --prefix=/usr/local # Installs to /usr/local
python setup.py build
michael@michael-laptop-ubuntu:~/Downloads/scipy-0.11.0rc1$ python setup.py buildRunning from scipy source directory.
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in /usr/local/lib
libraries mkl,vml,guide not found in /usr/lib
libraries mkl,vml,guide not found in /usr/lib/i386-linux-gnu
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/sse2
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
libraries ptf77blas,ptcblas,atlas not …Run Code Online (Sandbox Code Playgroud) 我想升级Scipy的0.9.0到0.12.0.我使用命令:
sudo pip install --upgrade scipy
Run Code Online (Sandbox Code Playgroud)
我得到了各种各样的错误,这些错误可以在pip.log文件中看到,我很遗憾不是很容易理解错误的python.任何帮助将不胜感激.
问题:将 numpy 链接到更正的线性代数库。过程太复杂了,我可能会第 6 次寻找解决方案,但我不知道出了什么问题。我在 Ubuntu 12.04.5 上。我重新安装了 blas 和 lapack,然后使用 pip 重新安装了 numpy。我在系统环境中这样做,然后也在 virtualenv 环境中尝试。所有的事情似乎都没有奏效。
这是我的numpy.__config__.show():
lapack_info:
NOT AVAILABLE
lapack_opt_info:
NOT AVAILABLE
openblas_lapack_info:
NOT AVAILABLE
blas_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
NOT AVAILABLE
atlas_threads_info:
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
atlas_3_10_threads_info:
NOT AVAILABLE
atlas_blas_info:
NOT AVAILABLE
atlas_3_10_blas_info:
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
atlas_blas_threads_info:
NOT AVAILABLE
openblas_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
blas_opt_info:
NOT AVAILABLE
atlas_info:
NOT AVAILABLE
atlas_3_10_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
mkl_info:
NOT AVAILABLE
Run Code Online (Sandbox Code Playgroud)
这是一个非常常见的错误,根据用户的环境和历史有很多解决方案。我最近按照此处的说明完成了安装 BLAS 和 LAPACK …
我在ec2上安装scipy时遇到了困难.所以我试图让文件下载,它显示以下错误.我错过了什么?非常感谢!这里真的是新手,可以使用远程环境.
$ curl http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.zip?r=&ts=1364951046&use_mirror=iweb
[1] 2355
-bash: amp: command not found
[2] 2357
-bash: amp: command not found
Run Code Online (Sandbox Code Playgroud) python ×6
scipy ×4
numpy ×3
ubuntu ×2
amazon-ec2 ×1
apt ×1
blas ×1
gcc ×1
lapack ×1
pip ×1
python-2.7 ×1
python-c-api ×1
upgrade ×1