我如何在linux ubuntu中安装python3线程模块

时间:2018-06-18 22:48:50

标签: linux python-3.x python-module

当我尝试在python3中安装到线程模块时发生错误:

  Could not find a version that satisfies the requirement threading (from versions: )

找不到线程的匹配分布 我已经尝试过安装这些:

pip3 install threading
pip3 install thread
python3 -m pip install threading
python3 -m pip install thread
sudo apt-get install python3-threading
sudo apt-get install python3-thread

我已经尝试了这些。前四个出现了:

Could not find a version that satisfies the requirement thread (from versions: )
No matching distribution found for thread

和最后两个

Reading package lists... Done
Building dependency tree
Reading state information... Done E: Unable to locate package python3-threading(or thread)
我该怎么办才能安装该模块。

1 个答案:

答案 0 :(得分:0)

您可以运行:

pip install thread6

pip是python的软件包管理器,用于安装python软件包或模块。请注意,您的系统上可能也有python2.x,并且可能会使用此命令调用pip v2。为了安全起见,运行:

pip3 install thread6