如何制作一个包含numpy,pandas,scipy,sklearn的python包?

时间:2016-03-18 11:16:12

标签: python-2.7 numpy

我想制作一个包含numpy,pandas,scipy和sklearn的python包,所以我可以把它带到没有安装python的任何linux,但我遇到了这个:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
    from . import add_newdocs
  File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: libblas.so.3: cannot open shared object file: No such file or directory

如何在没有root权限的情况下修复它?

PS:我没有root权限,所以我无法将python site-packages安装到python ...

2 个答案:

答案 0 :(得分:2)

您可以安装anaconda。它是一个多平台python发行版,可以安装在您的主文件夹中(具有用户权限)。它附带pipconda命令来安装您需要的任何软件包。它已经包含您提到的所有软件包(numpypandasscipysklearn),因此听起来非常适合您的需求。

答案 1 :(得分:0)

http://python-xy.github.io/可以解决这个问题吗?

(如果是Windows,我建议使用便携式http://winpython.sourceforge.net/