era*_*ran 152 python apt numpy pip scipy
我正在尝试在我正在分发的包中创建所需的库.它需要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)
我如何让它工作?
vk1*_*011 325
这在Ubuntu 14.04上对我有用:
sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
pip install scipy
Run Code Online (Sandbox Code Playgroud)
Chr*_*aro 73
如果您使用的是Ubuntu,则需要libblas和liblapack开发包.
aptitude install libblas-dev liblapack-dev
pip install scipy
Run Code Online (Sandbox Code Playgroud)
Dav*_*ans 33
我在答案中假设Linux经验; 我发现有三个先决条件可以pip install scipy很好地进行.
转到此处:安装SciPY
按照说明下载,构建和导出BLAS的env变量,然后是LAPACK.小心不要盲目地切断'n'粘贴shell命令 - 根据你的体系结构等,你需要选择几行,你需要修复/添加它错误地假定的正确目录.好.
您可能需要的第三件事是yum install numpy-f2py或等效的.
哦,是的,最后,您可能需要安装gcc-gfortran,因为上面的库是Fortran源代码.
Gre*_*reg 12
由于之前关于使用yum安装的说明已经破坏,因此更新了有关像fedora这样的安装的说明.我在"亚马逊Linux AMI 2016.03"上测试了这个
sudo yum install atlas-devel lapack-devel blas-devel libgfortran
pip install scipy
Run Code Online (Sandbox Code Playgroud)
我正在开发一个依赖于numpy和scipy的项目.在Fedora 23的干净安装中,使用Python 3.4的python虚拟环境(也适用于Python 2.7),以及我的setup.py中的以下内容(在setup()方法中)
setup_requires=[
'numpy',
],
install_requires=[
'numpy',
'scipy',
],
Run Code Online (Sandbox Code Playgroud)
我发现我必须运行以下内容才能开始pip install -e .工作:
pip install --upgrade pip
Run Code Online (Sandbox Code Playgroud)
和
sudo dnf install atlas-devel gcc-{c++,gfortran} subversion redhat-rpm-config
Run Code Online (Sandbox Code Playgroud)
这redhat-rpm-config是为了scipy的使用而redhat-hardened-cc1不是常规cc1
| 归档时间: |
|
| 查看次数: |
226303 次 |
| 最近记录: |