【发布时间】:2019-03-08 05:51:16
【问题描述】:
我的系统是ubuntu16.04 我有python2.7和python3.5
在我使用alias python=python3 && unalias python之后
python2.7和python3.5混用
然后我发现我有两个pip2.7的路径
$ which -a pip
/usr/local/bin/pip
/home/user/.local/bin/
然后我删除 python-pip
$ sudo apt-get autoremove python-pip
然后重新安装 pip
python get-pip.py --prefix=/usr/local/
$ which -a pip
/usr/local/bin/pip
当我尝试安装包时,结果是
$ sudo pip install numpy
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /home/user/.local/lib/python2.7/site-packages (1.15.2)
我该如何解决?任何想法?非常感谢
- /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/init.py:83:RequestsDependencyWarning:旧版本的密码学([1, 2, 3 ]) 可能会导致减速。 warnings.warn(warning, RequestsDependencyWarning)
- 已满足要求:/home/user/.local/lib/python2.7/site-packages (1.15.2) 中的 numpy
【问题讨论】:
标签: python python-3.x python-2.7 pip ubuntu-16.04