我是Python的新手,并试图> pip install linkchecker在Windows 7上.一些说明:
> pip install scrapy也会导致SSL错误.python而pip直到我安装3.4.1中不具备的命令行.> pip search linkchecker作品.也许这是因为pip搜索不会验证网站的SSL证书.以下是运行后我的pip.log的内容pip install linkchecker:
Downloading/unpacking linkchecker
Getting page https://pypi.python.org/simple/linkchecker/
Could not fetch URL https://pypi.python.org/simple/linkchecker/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/linkchecker/ when looking for download links for linkchecker
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries …Run Code Online (Sandbox Code Playgroud) 我正在使用Ubuntu并安装了Python 2.7.5和3.4.0.在Python 2.7.5中,我能够成功分配变量x = Value('i', 2),但不能在3.4.0中分配.我正进入(状态:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/multiprocessing/context.py", line 132, in Value
from .sharedctypes import Value
File "/usr/local/lib/python3.4/multiprocessing/sharedctypes.py", line 10, in <
module>
import ctypes
File "/usr/local/lib/python3.4/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'
Run Code Online (Sandbox Code Playgroud)
我刚刚通过安装3.4.0的源代码更新到3.3.2.它安装在/usr/local/lib/python3.4中.
我是否正确更新到Python 3.4?
有一点我注意到Python 3.4安装在usr/local/lib中,而Python 3.3.2仍然安装在usr/lib中,所以它没有被覆盖.
python install compiler-errors failed-installation python-3.4
在 GoDaddy VPS CentOs 7 上安装新的 Python 3.7.1。\n尝试 pip3 install virtualenv 或 python 3 -m pip install virtualenv 并获取:
\n\npip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。
\n\nopenssl-devel 已安装且是最新的
\n\n这个问题已经被问过很多次了,但是我找到的解决方案并没有解决我的问题。\n谢谢大家!
\n\n我尝试了以下基于 CentOs 和 Linux 的解决方案:
\n\n使用 pip3 安装软件包时“Python 中的 SSL 模块不可用” \n # 允许构建 python ssl 库\n yum install openssl-devel\n # 下载任何Python 版本的源\n cd /usr/src\n wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz \n tar xf Python-3.7.1.tar.xz \n cd Python-3.7.1
\n\n # Configure the build w/ your installed libraries\n …Run Code Online (Sandbox Code Playgroud) 我有anaconda软件包并运行Spyder。这是我的系统信息:
anaconda 2018.12 py37_0
Python 3.7.1
pip 18.1
Dell Inspiron 13 7000 64-bit
Run Code Online (Sandbox Code Playgroud)
我无法从命令提示符下使用pip安装任何内容。例如,在尝试安装numpy时(通过anaconda已经拥有),我得到以下信息:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: numpy in c:\users\uday rallabhandi\anaconda3\lib\site-packages (1.15.4)
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't …Run Code Online (Sandbox Code Playgroud) 我正在使用Kali dist所以我已经安装了Python 2.7,3.5和3.6.命令'python'和'pip'与Python 2.7相关联.但是'python3'使用Python 3.6,而pip3正在为Python 3.5安装包.
当我试图创建一个venv时:
pip3 -p python3.6 virtualenv myenv
Run Code Online (Sandbox Code Playgroud)
我有一个错误:
no such option: -p
Run Code Online (Sandbox Code Playgroud)
如何将pip3与Python 3.6而不是Python 3.5相关联?
在尝试编译 python 3.7 时,我点击了Could not import runpy module:
jeremyr@b88:$ wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
....
jeremyr@b88:~/Python-3.7.3$ ./configure --enable-optimizations
jeremyr@b88:~/Python-3.7.3$ make clean
jeremyr@b88:~/Python-3.7.3$ make -j32
....
gcc -pthread -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.7m.a -lcrypt -lpthread -ldl -lutil -lm
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Could not import runpy module
Traceback (most recent call last):
File "/home/jeremyr/Python-3.7.3/Lib/runpy.py", line …Run Code Online (Sandbox Code Playgroud) 编辑:我发现的评论或其他答案中建议的答案主要适用于 linux 或使用 brew 安装的默认 python。我面临的问题是使用 pyenv 安装的 python 版本
当我尝试使用 pip 安装任何软件包时,我收到此错误消息
WARNING: pip is configured with locations that require TLS/SSL, however the SSL module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the SSL certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with URL: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Run Code Online (Sandbox Code Playgroud)
我正在使用 pyenv、pyenv-virtualenv,我正在尝试使用 python 3.7.0 在 virtualenv 中安装软件包。几天前它运行良好,我怀疑将我的 macOS 更新到 10.14.6 导致了这个问题。 …
问题:
重新安装Anaconda之后,我将无法再使用命令窗口导航到一个文件夹,在该窗口中我有一些.pynb文件,键入文件jupyter notebook并启动并运行。我收到这些错误:
C:\ scripts \ notebooks> jupyter笔记本Traceback(最近一次通话最近):文件“ C:\ Users \ MYUSERID \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ notebook \ services \ sessions \ sessionmanager.py” ,从sqlite3.dbapi2 import导入sqlite3文件“ C:\ Users \ MYUSERID \ AppData \ Local \ Continuum \ anaconda3 \ lib \ sqlite3__init __。py”的第10行,导入*文件“ C:\ Users \ MYUSERID \ AppData \ Local \ Continuum \ anaconda3 \ lib \ sqlite3 \ dbapi2.py”,第27行,来自_sqlite3 import * ImportError:DLL加载失败:找不到Procedyre
在处理上述异常期间,发生了另一个异常:
回溯(最近一次通话):文件“ …
仍然在我的教程中学习python,我被告知要做
sudo -H pip install requests
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting requests
Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
Run Code Online (Sandbox Code Playgroud)
有人会知道我该怎么做才能彻底解决该问题吗?
提前非常感谢
在我的Ubuntu 20.04. 我正在使用两个python版本。其中一个是Python3.8.2我的Ubuntu安装附带的,另一个是Python3.7.5. 我与系统默认版本一起Python3.7.5使用安装update-alternatives。但现在的问题是没有pip命令正在处理Python3.7.5。尽管pip在此 ( Python3.7.5) 安装中可用,并且在打印版本时它显示以下内容(使用命令pip3.7 -V):
pip 19.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
Run Code Online (Sandbox Code Playgroud)
但是每当我尝试使用它安装软件包时,总是会显示标题中提到的错误。例如在安装以下软件包时:
sudo pip3.7 install intel-tensorflow==1.15.2
Run Code Online (Sandbox Code Playgroud)
抛出以下错误:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting intel-tensorflow==1.15.2
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because …Run Code Online (Sandbox Code Playgroud) 我正在尝试从容器中的源代码构建 Python 和 OpenSSL。两者似乎都构建正确,但 Python 没有成功创建_ssl模块。
我在网上找到了一些指南 ,其中提到取消 Python 中的注释和行3.X.X/Modules/Setup,并将--openssldir=/usr/local/ssl标志添加到./configureOpenSSL 的步骤中。我在我的 dockerfile 中执行这些操作。这导致在./configurePython 输出期间,我看到以下行。
checking for X509_VERIFY_PARAM_set1_host in libssl... yes
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误:
[91m*** WARNING: renaming "_ssl" since importing it failed: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by build/lib.linux-x86_64-3.8/_ssl.cpython-38-x86_64-linux-gnu.so)
[0m[91m*** WARNING: renaming "_hashlib" since importing it failed: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by build/lib.linux-x86_64-3.8/_hashlib.cpython-38-x86_64-linux-gnu.so)
[0m
Python build finished successfully!
Run Code Online (Sandbox Code Playgroud)
...
Following modules built successfully but were removed because they …Run Code Online (Sandbox Code Playgroud) 我有Python 2.7.9并Python 3.4.3安装在Ubuntu 15.04机器上.现在我想升级Python 3.4.3到Python 3.6.1不影响依赖的包Python 3.x.x.我发现Python版本是作为单独的包发布的.所以,我的问题是:
Python 3.4.3到Python 3.6.1吗?Python 3.4.3并安装Python 3.6.1而不影响已安装的软件包吗?Python 3.6.1使用会发生什么sudo apt-get install python 3.6.1?我可以在终端和虚拟环境中Python 3.6.1使用Python3.6命令而不影响其他版本吗?我从 - > /sf/answers/3133103501/安装了Python 3.6
python ×12
pip ×6
python-3.x ×3
ssl ×3
linux ×2
openssl ×2
python-3.7 ×2
anaconda ×1
centos ×1
docker ×1
download ×1
gcc ×1
install ×1
jupyter ×1
pyenv ×1
python-2.7 ×1
python-3.4 ×1
runpy ×1
sqlite ×1
tls1.2 ×1
ubuntu-15.04 ×1
windows ×1