我正在尝试使用安装Python库pip,收到SSL错误:
~/projects/base ? pre-master± pip install xdict
Collecting xdict
Could not fetch URL https://pypi.python.org/simple/xdict/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement xdict (from versions: )
No matching distribution found for xdict
Run Code Online (Sandbox Code Playgroud)
点数版本:pip 9.0.1
我该如何解决这个错误?
我很难用pip安装几乎任何东西.我是编码的新手,所以我想也许这是我一直做错的事情,并选择了easy_install以获得我需要做的大部分工作,这通常都有效.但是,现在我正在尝试下载nltk库,并且都没有完成工作.
我试过进去
sudo pip install nltk
Run Code Online (Sandbox Code Playgroud)
但得到了以下回应:
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip run on Sat May 4 00:15:38 2013
Downloading/unpacking nltk
Getting page https://pypi.python.org/simple/nltk/
Could not fetch URL [need more reputation to post link]: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL [need more reputation to post link]/simple/nltk/ when looking for download links for nltk
Getting page [need more reputation to post link]/simple/
Could not fetch URL https://pypi.python. org/simple/: There …Run Code Online (Sandbox Code Playgroud) 我在这里关注Flask教程:
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
我到达了尝试./run.py的地步,我得到:
Traceback (most recent call last):
File "./run.py", line 3, in <module>
from app import app
File "/Users/benjaminclayman/Desktop/microblog/app/__init__.py", line 1, in <module>
from flask import Flask
ImportError: No module named flask
Run Code Online (Sandbox Code Playgroud)
这看起来类似于:
但他们的解决方案没有帮助.作为参考,我也有这一个用户提到可能会导致问题的文件夹命名的烧瓶中.
我想在我的主要Python安装上更新pip,特别是获取list命令.其中还包括列表更新功能.
所以我跑了:
sudo pip install --upgrade pip
Run Code Online (Sandbox Code Playgroud)
所有看起来都很好的安装,但后来我去运行pip得到了这个:(如果有帮助,包括安装结束)
Installing pip script to /usr/local/bin
Installing pip-2.7 script to /usr/local/bin
Successfully installed pip
Cleaning up...
tom@tom-sam:~$ pip list -o
bash: /usr/bin/pip: No such file or directory
tom@tom-sam:~$ pip
bash: /usr/bin/pip: No such file or directory
Run Code Online (Sandbox Code Playgroud)
显然有点明显我是因为这是我的python系统安装.我在这里读了几个答案但是还没能确定最简单的修复方法.
我正在尝试更新pip使用pip install --upgrade pip,但我同时收到"需求满足"错误和"过时版本"消息
$ pip install --upgrade pip
Requirement already up-to-date: pip in
/Users/user/Envs/proj/lib/python2.7/site-packages
You are using pip version 9.0.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip'
command.
Run Code Online (Sandbox Code Playgroud)
我该如何更新?
我无法安装任何Python库.我正在使用pip 9.0.1和python 2.7.我收到以下错误:
EN-NishantS:~ 8417$ pip install presto-python-client
Collecting presto-python-client
Could not find a version that satisfies the requirement presto-python-client (from versions: )
No matching distribution found for presto-python-client
Run Code Online (Sandbox Code Playgroud)
在运行时,pip install -vvv我得到以下内容:
Collecting presto-python-client
1 location(s) to search for versions of presto-python-client:
* https://pypi.python.org/simple/presto-python-client/
Getting page https://pypi.python.org/simple/presto-python-client/
Looking up "https://pypi.python.org/simple/presto-python-client/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/presto-python-client/ HTTP/1.1" 403 170
Status code 403 not in [200, …Run Code Online (Sandbox Code Playgroud) 我在macbook pro上运行OSX Sierra 10.12.6
当你尝试安装任何东西时,pip 10.0.0b1中的已知错误会导致陷阱:5.这也可以防止你将pip本身更新为10.0.0b2,这可能会修复这个bug.
所以 - 我卸载了pip,以为我会回到easy_install来获取最新消息 - 但是NOOOO!(这里磨牙的声音......)
这就是我得到的:
(**启动控制台输出)
sudo easy_install pip密码:
寻找点读取https://pypi.python.org/simple/pip/
在https://pypi.python.org/simple/pip/上下载错误:[SSL:TLSV1_ALERT_PROTOCOL_VERSION] tlsv1警报协议版本(_ssl.c:590) - 可能找不到某些软件包!
找不到'pip'的索引页面(可能拼写错误?)
扫描所有包装的索引(这可能需要一段时间)
阅读https://pypi.python.org/simple/
在https://pypi.python.org/simple/上下载错误:[SSL:TLSV1_ALERT_PROTOCOL_VERSION] tlsv1警报协议版本(_ssl.c:590) - 可能找不到某些软件包!
没有找到pip的本地软件包或下载链接
错误:无法找到Requirement.parse('pip')的合适分布**
(**终端控制台输出)
我试图避免卸载并重新安装pythonic.上面的输出似乎表明SSL/TLS版本存在问题,但它并没有告诉我足够的数字.
有帮助吗?我无法相信MAC OSX不支持正确的SSL/TLS版本.我认为这个消息是一个红色的鲱鱼(或者如果你得到那个参考,那么'没有腿的青蛙')
TIA
除了Mac OSX附带的Python版本之外,我最近从他们的网站上下载了python.这是我开始在使用pip安装软件包时遇到问题.
sudo pip install -vvv pygoogle
Run Code Online (Sandbox Code Playgroud)
将输出以下内容:
The directory '/Users/robot/Library/Caches/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 '/Users/robot/Library/Caches/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 …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用pip 安装一个名为got的软件包.但它不断出现"无法找到满足要求的版本"的错误.
我在网上搜索了解决方案.有一些解释说尝试pip freeze> requirements.txt.但它仍然是我的黑盒子.
这里有什么问题,我应该怎么做才能安装包?
谢谢!
我正在尝试将其发布到 TestPypi 的 python 库中。到目前为止,发布我的诗歌作品还没有出现任何问题。
对于上下文,作为初学者,我来自这些网站:
出现的唯一问题是,使用 pip install 安装软件包时,未考虑 pyproject.toml 中列出的依赖项。
我尝试过更新setuptools,pip但没有成功。
我的目标是进行干净的依赖安装,而不会出现版本控制错误。
这是我尝试过的主要解决方案。
我隐藏了我的真实姓名。
[tool.poetry]
name = "package-name"
version = "0.1.0"
description = "<desc>"
authors = ["<myname> <myemail>"]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.10"
beautifulsoup4 = {version = "4.11.1", allow-prereleases = true}
recurring-ical-events = {version = "1.0.2b0", allow-prereleases = true}
requests = {version = "2.28.0", allow-prereleases = true}
rich = {version = "12.4.4", allow-prereleases = …Run Code Online (Sandbox Code Playgroud) pip ×9
python ×9
easy-install ×2
macos ×2
python-2.7 ×2
dependencies ×1
flask ×1
install ×1
nltk ×1
package ×1
ssl ×1
ubuntu-12.10 ×1
upgrade ×1
zsh ×1