gpt4 book ai didi

python - 无法安装 pip 和包

转载 作者:行者123 更新时间:2023-12-05 07:33:19 25 4
gpt4 key购买 nike

<分区>

我正在使用 python 3.6。 Pip 与 python 一起安装。似乎 pip 没有出现。尝试了此处可用的各种解决方案,但没有任何效果。请帮我解决这个问题。

验证完成:路径设置为 C:\Program Files\Python36\Scripts为所有 3 添加主机条目

画中画错误:

C:\Users\>pip
Traceback (most recent call last):
File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python36\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'main'

尝试过的解决方案:

pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org {package name}

C:\Users\>pip
Traceback (most recent call last):
File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python36\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'main'

C:\Users>python3 -m pip uninstall pip setuptools
'python3' is not recognized as an internal or external command,
operable program or batch file.

C:\Users>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> python3 -m pip uninstall pip setuptools
File "<stdin>", line 1
python3 -m pip uninstall pip setuptools
^
SyntaxError: invalid syntax
>>> python3 -m pip uninstall pip setuptools
File "<stdin>", line 1
python3 -m pip uninstall pip setuptools
^
SyntaxError: invalid syntax
>>> pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org {package name}
File "<stdin>", line 1
pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org {package name}
^
SyntaxError: invalid syntax
>>>

使用以下版本

C:\Users\>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com