ModuleNotFoundError:没有名为“ gitlab”的模块

时间:2018-07-23 15:00:52

标签: python gitlab

由于某些原因,在安装python-gitlab之后遇到此错误ModuleNotFoundError: No module named 'gitlab'。我通过...安装了它。

  • source venv/bin/activate开始venv
  • sudo pip install --upgrade python-gitlab(根据python-gitlab文档)
  • 还尝试了pip install python-gitlab(在对之前的点卸载后)
  • 后跟一个pip freeze > requirements.txt
  • 然后在页面顶部添加一个import gitlab

安装后的输出是...

Collecting python-gitlab
Requirement not upgraded as not directly required: six in ./venv/lib/python3.6/site-packages (from python-gitlab) (1.11.0)
Requirement not upgraded as not directly required: requests>=2.4.2 in ./venv/lib/python3.6/site-packages (from python-gitlab) (2.13.0)
Installing collected packages: python-gitlab
Successfully installed python-gitlab-1.5.1

我正在使用Python 3.6.4。我究竟做错了什么?

0 个答案:

没有答案