相关疑难解决方法(0)

ImportError:没有名为pip的模块

操作系统: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的模块

以前遇到过同样问题的人可以给我一些解决方法吗?

python pip

89
推荐指数
16
解决办法
27万
查看次数

如何修复 ModuleNotFoundError: No module named 'pip._internal' with python source code installation

我已经通过编译源代码在redhat机器上安装了python3.7,但是在处理pip3时遇到了问题。安装后我做了以下步骤:

sudo ln /usr/local/bin/python3.7 /usr/bin/python3

sudo ln /usr/local/bin/pip3.7 /usr/bin/pip3
Run Code Online (Sandbox Code Playgroud)

python3 -- 版本给出了 Python 3.7.3

但是通过运行这些命令我遇到了这个错误:

python3 -m pip install requests
Run Code Online (Sandbox Code Playgroud)

给出/usr/bin/python3: 没有名为 pip.__main__ 的模块;'pip'是一个包,不能直接执行

pip3 install requests
Run Code Online (Sandbox Code Playgroud)

给出ModuleNotFoundError: No module named 'pip._internal'

redhat pip python-3.x

15
推荐指数
3
解决办法
2万
查看次数

无法在 python 3.9 中使用 pip 安装 pylint

我开始使用 VS Code,但 pylint 未安装,它给了我一个错误。我尝试使用 pip 安装 pylint,但它给了我一个错误代码。

Collecting pylint
  Using cached pylint-2.6.0-py3-none-any.whl (325 kB)
Collecting astroid<=2.5,>=2.4.0
  Using cached astroid-2.4.2-py3-none-any.whl (213 kB)
Collecting colorama
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting isort<6,>=4.2.5
  Using cached isort-5.6.4-py3-none-any.whl (98 kB)
Collecting lazy-object-proxy==1.4.*
  Using cached lazy-object-proxy-1.4.3.tar.gz (34 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
  WARNING: Requested lazy-object-proxy==1.4.* from https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz#sha256=f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0 (from astroid<=2.5,>=2.4.0->pylint), but installing version 0.0.0
ERROR: Requested lazy-object-proxy==1.4.* from https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz#sha256=f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0 (from astroid<=2.5,>=2.4.0->pylint) has different …
Run Code Online (Sandbox Code Playgroud)

python pip

3
推荐指数
1
解决办法
3838
查看次数

标签 统计

pip ×3

python ×2

python-3.x ×1

redhat ×1