[英]Why modules installed by pip3 can not be used python3?
在新的 Ubuntu 服务器中,我运行以下命令来安装 pip。
https://pip.pypa.io/en/stable/installing/
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
但是python3找不到安装的模块。 有人知道如何安装 pythons 模块以便它们可以正常工作吗?
$ which pip3
/usr/local/bin/pip3
$ pip3 install socks
Requirement already satisfied: socks in /usr/local/lib/python3.8/dist-packages (0)
$ which python3
/usr/bin/python3
$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socks
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'socks'
我发现应该使用这个 pip3 安装命令。
pip3 install pysocks
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.