Hi,
bei mir nutzt pip3 anscheinend die falsche python Version:
sudo easy_install --upgrade pip Searching for pip Reading https://pypi.org/simple/pip/ Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl#sha256=993134f0475471b91452ca029d4390dc8f298ac63a712814f101cd1b6db46676 Best match: pip 19.1.1 Processing pip-19.1.1-py2.py3-none-any.whl Installing pip-19.1.1-py2.py3-none-any.whl to /usr/local/lib/python2.7/dist-packages Adding pip 19.1.1 to easy-install.pth file Installing pip script to /usr/local/bin Installing pip3.7 script to /usr/local/bin Installing pip3 script to /usr/local/bin Installed /usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip
pip3 --version pip 19.1.1 from /usr/local/lib/python2.7/dist-packages/pip-19.1.1-py2.7.egg/pip (python 2.7)
which pip3 /usr/local/bin/pip3
pip3 install gitpython --user DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting gitpython Using cached https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from gitpython) (2.0.5) Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from gitdb2>=2.0.0->gitpython) (2.0.5) Installing collected packages: gitpython Successfully installed gitpython-2.1.11
python3 -c "import git" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'git'
Das installierte Modul git wird leider auch nicht gefunden.
Auf einer anderen Bionic installation sehen die Versionsdaten so aus:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Es wird anscheinend die das alte python 2.7 genutzt, obwohl python 3 installiert ist. Wird deswegen gitpython nicht gefunden? Wie kann ich das beheben?
LG
julia
Moderiert von Taomon:
Verschoben.