这是找不到模块的另一个问题。我读了无数的文章,但没有找到任何一个可以帮助我解决此问题的文章。这里有问题的模块是“ PyOpenSSL”,我正在Mac上运行。
这是我在Python3中运行时遇到的错误:
ModuleNotFoundError: No module named 'pyopenssl'
我尝试使用pip3和“ python3 -m pip install pyopenssl”安装pyopenssl。这是我得到的输出:
pip3 install pyopenssl
Requirement already satisfied: pyopenssl in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (19.1.0)
输出:
which python3
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
which -a python
/usr/bin/python
我的.bash_profile:
cat ~/.bash_profile
# Setting PATH for Python 3.8
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
export PYTHONPATH=$PYTHONPATH:/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
已安装模块列表:
pip3 list
Package Version
----------------- -------
astroid 2.3.3
cffi 1.14.0
click 7.1.1
cryptography 2.8
Flask 1.1.1
isort 4.3.21
itsdangerous 1.1.0
Jinja2 2.11.1
lazy-object-proxy 1.4.3
MarkupSafe 1.1.1
mccabe 0.6.1
pip 20.0.2
pycparser 2.20
pylint 2.4.4
pyOpenSSL 19.1.0
setuptools 41.2.0
six 1.14.0
Werkzeug 1.0.0
wrapt 1.11.2