我安装了最新的python(2.7.9)捆绑了pip和setuptools for windows 32-bit.我已经尝试重新安装pip,但问题仍然存在.
这是pip --version在Administrator cmd中运行后的错误:
Traceback (most recent call last):
File "D:\Python\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "D:\Python\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "D:\Python\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name main
Run Code Online (Sandbox Code Playgroud) 操作系统:Mac OS X 10.7.5 Python Ver:2.7.5
我已经安装了ez_setup.py setuptools的1.0从https://pypi.python.org/pypi/setuptools 然后,我从下载pip.1.4.1 PKG https://pypi.python.org/pypi/pip/1.4.1.
在iTerm中运行"[sudo] python setup.py install"显示
运行安装运行bdist_egg运行egg_info写入要求到pip.egg-info/requires.txt写pip.egg-info/PKG-INFO写顶级名称到pip.egg-info/top_level.txt将dependency_links写入pip.egg- info/dependency_links.txt写入条目指向pip.egg-info/entry_points.txt警告:manifest_maker:未找到标准文件'setup.py'
读取清单文件'pip.egg-info/SOURCES.txt'编写清单文件'pip.egg-info/SOURCES.txt'安装库代码来构建/ bdist.macosx-10.6-intel/egg运行install_lib警告:install_lib:' build/lib'不存在 - 没有要安装的Python模块
创建build/bdist.macosx-10.6-intel/egg创建build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/PKG-INFO - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/SOURCES.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/dependency_links.txt - > build/bdist.macosx- 10.6-intel/egg/EGG-INFO复制pip.egg-info/entry_points.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/not-zip-safe - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/requires.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/top_level .txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO创建'dist/pip-1.4.1-py2.7.egg'并添加'build/bdist.macosx-10.6-intel/egg'删除'build/bdist.macosx-10.6-intel/egg'(及其下的所有内容)处理pip-1.4.1-py2.7.egg删除'/Users/dl/Library/Python/2.7/lib/python /site-packages/pip-1.4.1-py2.7.egg'(及其下的所有内容)创建/ Users/dl/Library/Python/2 .7/lib/python/site-packages/pip-1.4.1-py2.7.egg将pip-1.4.1-py2.7.egg解压缩到/Users/dl/Library/Python/2.7/lib/python/ site-packages pip 1.4.1已经是easy-install.pth中的活动版本.将pip脚本安装到/Users/dl/Library/Python/2.7/bin将pip-2.7脚本安装到/Users/dl/Library/Python/2.7 /箱
已安装/Users/dl/Library/Python/2.7/lib/python/site-packages/pip-1.4.1-py2.7.egg pip的处理依赖关系== 1.4.1 pip的完成处理依赖关系== 1.4.1
然后我输入了"pip install",错误信息显示出来
回溯(最近一次调用最后一次):文件"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip",第9行,在load_entry_point中('pip == 1.4.1','console_scripts','pip' )()文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第357行,在load_entry_point文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第2394行, load_entry_point文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第2108行,in load ImportError:没有名为pip的模块
以前遇到过同样问题的人可以给我一些解决方法吗?
我从 19.10 升级到 Ubuntu 20.04,现在我无法使用 pip。
zeno:~$ pip --version
Command 'pip' not found, but there are 18 similar ones.
Run Code Online (Sandbox Code Playgroud)
安装了 Python:
zeno:~$ python3 --version
Python 3.8.2
Run Code Online (Sandbox Code Playgroud)
但是如果我尝试安装 pip,我会得到这个:
zeno:~/Desktop/tetris$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (20.0.2-5ubuntu1).
The following packages were automatically installed and are no longer required:
dh-python elpa-async enchant gedit-plugin-zeitgeist gir1.2-mutter-5
gnome-software-common libappstream-glib8 libapt-pkg5.90
libboost-date-time1.67.0 libboost-iostreams1.67.0 libbrlapi0.6
libcodec2-0.8.1 libcroco3 libdns-export1104 libdns1104 libdvdread4
libegl1-mesa libenchant1c2a …Run Code Online (Sandbox Code Playgroud)