Die Installation von Pysftp über Pip ist fehlgeschlagen (wegen 2 Python2.x-Versionen?)Python

Python-Programme
Guest
 Die Installation von Pysftp über Pip ist fehlgeschlagen (wegen 2 Python2.x-Versionen?)

Post by Guest »

Mein Ubuntu 10.04 wurde mit Python 2.6 geliefert. Jetzt habe ich auch Python 2.7 installiert, was jetzt der Systemstandard ist, denn wenn ich Python vom Terminal aus starte, startet es Python 2.7.

Jetzt habe ich Ich möchte die Bibliothek pysftp mit pip installieren, aber es fällt mir schwer. Nachfolgend folgen einige Ergebnisse meiner Versuche und Schlussfolgerungen. Ich habe pip install pysftp durchgeführt, aber da steht Folgendes:

Code: Select all

Downloading/unpacking pysftp
Running setup.py egg_info for package pysftp
Traceback (most recent call last):
File "", line 3, in 
File "/usr/local/lib/python2.6/dist-packages/setuptools/__init__.py", line 12, in 
from setuptools.extension import Extension
File "/usr/local/lib/python2.6/dist-packages/setuptools/extension.py", line 8, in 
from .dist import _get_unpatched
File "/usr/local/lib/python2.6/dist-packages/setuptools/dist.py", line 21, in 
packaging = pkg_resources.packaging
AttributeError: 'module' object has no attribute 'packaging'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 3, in 

File "/usr/local/lib/python2.6/dist-packages/setuptools/__init__.py", line 12, in 

from setuptools.extension import Extension

File "/usr/local/lib/python2.6/dist-packages/setuptools/extension.py", line 8, in 

from .dist import _get_unpatched

File "/usr/local/lib/python2.6/dist-packages/setuptools/dist.py", line 21, in 

packaging = pkg_resources.packaging

AttributeError: 'module' object has no attribute 'packaging'

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in ./pip-log.txt
Mir scheint, dass pip (das offensichtlich vor der Installation von Python 2.7 installiert wurde) auf die alte Version von Python verweist, die pysftp nicht unterstützt. Auch weil, wenn ich pip --version mache, es heißt:

Code: Select all

pip 0.3.1 from /usr/lib/python2.6/dist-packages (python 2.6)
Wenn ich „Whereis Python“ ausführe, erhalte ich die folgenden Informationen:

Code: Select all

python: /usr/src/Python-2.7.10/python /usr/bin/python2.6 /usr/bin/python /etc/python2.6 /etc/python /usr/lib/python2.6 /usr/lib/python3.1 /usr/lib64/python2.6 /usr/lib64/python3.1 /usr/local/bin/python2.7-config /usr/local/bin/python /usr/local/bin/python2.7 /usr/local/lib/python2.6 /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/python /usr/share/man/man1/python.1.gz
Wie kann ich pysftp installieren?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post