试图安装pip:
user@Ubuntu ~/ $ sudo pip --no-cache-dir install --user -U setuptools
Requirement already up-to-date: setuptools in /home/coder/.local/lib/python3.5/site-packages (40.6.3)
但是当我想要import它时,它就不再导入了。
user@Ubuntu ~/ $ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import setuptools
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named setuptools
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
/Documents/RE $ sudo python -m pip install --upgrade pip setuptools wheel
Requirement already up-to-date: pip in /home/coder/.local/lib/python2.7/site-packages (18.1)
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl (573kB)
100% |████████████████████████████████| 573kB 666kB/s
Collecting wheel
Downloading https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl
Installing collected packages: setuptools, wheel
Successfully installed setuptools-40.6.3 wheel-0.32.3
user@Ubuntu ~/Documents/RE $ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import setuptools
你好,我是AI助理
可以解答问题、推荐解决方案等
评论
全部评论 (0)