简体   繁体   English

Python virtualenv安装scipy

[英]Python virtualenv install scipy

I'm trying to install scipy with pip on a machine I have limited access to, I can't run any sudo or apt-get commands. 我正在尝试在访问受限的计算机上使用pip安装scipy ,我无法运行任何sudoapt-get命令。 I made a python virtual enviroment and installed numpy in it, so far so good. 我制作了一个python虚拟环境,并在其中安装了numpy,到目前为止一切顺利。 But when I try to install scipy , I get "no lapack/blas resources found". 但是,当我尝试安装scipy时 ,出现“找不到lapack / blas资源”。

I tried to run 我试着跑

$ export LAPACK=/usr/lib/liblapack.so.3
$ export BLAS=/usr/lib/libblas.so

And then install scipy, but still get the same error. 然后安装scipy,但仍然出现相同的错误。 There is also liblapack.so.3gf and libblas.so.3 , libblas.so.3.0 and libblas.a , should I export any/either of those? 还有liblapack.so.3gflibblas.so.3libblas.so.3.0libblas.a ,我应该导出其中一个/两个吗?

I've seen number of threads about this, but almost all of them include apt-get . 我已经看到了许多与此相关的线程,但是几乎所有线程都包含apt-get I know that BLAS/LAPACK is installed on this machine, but I'm just not familiar enough with Linux to know exactly where the problem is. 我知道这台计算机上已安装了BLAS / LAPACK,但是我对Linux不够熟悉,无法确切知道问题出在哪里。

一个选项,以获取工作SciPy的环境将安装蟒蛇

In general virtualenv does not work well with different versions of compiled extensions. 通常,virtualenv不适用于不同版本的已编译扩展。 If you want to have different versions of scipy & numpy installed simultaneously, the best tool is conda . 如果要同时安装不同版本的scipy&numpy,最好的工具是conda See this page for info on creating conda envs, which are like virtual envs but can handle non-python dependencies in a sane way. 请参阅此页面上创建畅达ENVS,这就像虚拟ENVS,但可以在一个健全的方式处理非python的依赖关系信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM