由于某些原因,在安装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。我究竟做错了什么?