python安装包之后仍提示_即使在安装包之后也无法导入

我已经安装了numpy,scipy,scikit learn和其他必需的软件包。但当我尝试在python中导入它们时,它显示没有找到任何模块。在pip install -U numpy scipy scikit-learn

Requirement already up-to-date: numpy in /usr/lib/python2.7/dist-packages

Collecting scipy

Downloading scipy-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl (39.5MB)

100% |████████████████████████████████| 39.5MB 32kB/s

Requirement already up-to-date: scikit-learn in /home/tecsadmin/.local/lib/python2.7/site-packages

Installing collected packages: scipy

Found existing installation: scipy 0.17.0

DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

Uninstalling scipy-0.17.0:

Exception:

Traceback (most recent call last):

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main

status = self.run(options, args)

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run

prefix=options.prefix_path,

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install

requirement.uninstall(auto_confirm=True)

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall

paths_to_remove.remove(auto_confirm)

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove

renames(path, new_path)

File "/home/tecsadmin/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames

shutil.move(old, new)

File "/usr/lib/python2.7/shutil.py", line 303, in move

os.unlink(src)

OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/scipy-0.17.0.egg-info'

tecsadmin@BLITZ:~/.local/lib/python2.7/site-packages/sklearn/__check_build$ python

Python 2.7.5 (default, Jun 17 2016, 04:41:21)

[GCC 5.3.1 20160413] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import numpy

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named numpy

>>>

更新

^{pr2}$

更新2tecsadmin@BLITZ:~$ pip freeze | grep numpy

numpy==1.11.0

tecsadmin@BLITZ:~$ pip freeze | grep scipy

scipy==0.17.1

tecsadmin@BLITZ:~$ pip freeze | grep scikit-learn

scikit-learn==0.17.1

tecsadmin@BLITZ:~$ python

Python 2.7.5 (default, Jun 17 2016, 04:41:21)

[GCC 5.3.1 20160413] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import scipy

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named scipy

>>> import numpy

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named numpy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值