无法安装python-colorama

时间:2019-03-30 06:23:35

标签: python windows-10 ubuntu-18.04

我正在尝试从https://github.com/sukeesh/Jarvis安装 Jarvis ai(我知道它不是要安装在Windows 10上的,但我还是想尝试)

它说no module named colorama,所以我输入了pip install python-colorama。然后它说

Could not find a version that satisfies the requirement python-colorama (from versions: )
No matching disribution found for python-colorama

我尝试使用ubuntu安装它,但发生了其他问题:它说

Specify python version(2/3)(Default-3)3
Selected python version 3
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 22, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'

因此,就像在一个问题中问了两个问题。在Windows上是

C:\Users\badarsyah\Jarvis>pip install python-colorama
Collecting python-colorama
  Could not find a version that satisfies the requirement python-colorama (from versions: )
No matching distribution found for python-colorama

但是在Ubuntu 18.04上

aiki@LAPTOP-886AEJJG:~/Jarvis$ ./setup.sh
Specify python version(2/3)(Default-3)3
Selected python version 3
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 22, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'

我希望任何人都能提供帮助,但是请先阅读GitHub,以便您了解我正在尝试做什么。

2 个答案:

答案 0 :(得分:0)

我设法通过简单地更新pip来解决了这个问题

python -m pip install -U pip

然后再次运行安装命令。

答案 1 :(得分:0)

您可以使用PIP安装模块:

pip install distutils.spawn