Pip: Assertion Error mit Pip-Liste

Erstellt am 27. Juli 2013  ·  42Kommentare  ·  Quelle: pypa/pip

Ich habe den folgenden Fehler festgestellt, nachdem ich pip installiert und versucht habe:
Pip-Liste - veraltet


C:\Python33\Scripts\pip-script.py run on 07/27/13 15:32:54
Exception:
Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\pip\basecommand.py", line 134, in main
    status = self.run(options, args)
  File "C:\Python33\lib\site-packages\pip\commands\list.py", line 74, in run
    self.run_outdated(options)
  File "C:\Python33\lib\site-packages\pip\commands\list.py", line 83, in run_outdated
    for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
  File "C:\Python33\lib\site-packages\pip\commands\list.py", line 104, in find_packages_latests_versions
    installed_packages = get_installed_distributions(local_only=options.local, include_editables=False, skip=self.skip)
  File "C:\Python33\lib\site-packages\pip\util.py", line 384, in get_installed_distributions
    return [d for d in pkg_resources.working_set
  File "C:\Python33\lib\site-packages\pip\util.py", line 387, in <listcomp>
    and editable_test(d)
  File "C:\Python33\lib\site-packages\pip\util.py", line 377, in <lambda>
    editable_test = lambda d: not dist_is_editable(d)
  File "C:\Python33\lib\site-packages\pip\util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "C:\Python33\lib\site-packages\pip\__init__.py", line 194, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
lisshow auto-locked bug

Hilfreichster Kommentar

Das Problem ist immer noch in _Ubuntu 15.04, Pip 1.5.6, Distribute-0.7.3_ vorhanden (das Pip-Upgrade von 'Pip' oder 'Distribute' funktioniert nicht, da das Problem Ubuntu-spezifisch zu sein scheint. Siehe unten).

Das Problem:

  • So entfernen Sie das Ubuntu-Paket: sudo apt-get remove --auto-remove python-pip
  • Laden Sie das offizielle Pip-Installationsprogramm herunter: wget https://bootstrap.pypa.io/get-pip.py
  • Installieren Sie pip, indem Sie das heruntergeladene Installationsprogramm ausführen: sudo python get-pip.py
  • Fügen Sie sym-link hinzu, damit es ohne vollständigen Pfad ausgeführt wird: sudo ln -s /usr/local/bin/pip /usr/bin/pip

Getan!


Das Problem protokolliert:

$ sudo pip install -U pip
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.1.1-py2.py3-none-any.whl#md5=172eb5abab25a5e0f7a7b63c7a49378d
  Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.6
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...

$ pip install --upgrade distribute
Downloading/unpacking distribute
  Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
  Running setup.py (path:/tmp/pip-build-ZpdlMd/distribute/setup.py) egg_info for package distribute

Downloading/unpacking setuptools>=0.7 (from distribute)
  Downloading setuptools-16.0-py2.py3-none-any.whl (461kB): 461kB downloaded
Installing collected packages: setuptools, distribute
  Running setup.py install for distribute

Successfully installed setuptools distribute
Cleaning up...

$ pip list
aniso8601 (0.92)
...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 367, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 299, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing debug log for failure in /home/user/.pip/pip.log

Alle 42 Kommentare

Dies geschieht, wenn Sie Distribute mit dem Skript http://python-distribute.org/distribute_setup.py installieren. Das Ausführen von pip install -U distribute behebt das Problem. Der Fehler wird nur in pip==1.4 reproduziert. Hier ist, warum diese Zeile fehlschlägt:

ipdb> specs
[]

Okay, das hat das Problem behoben, aber jetzt habe ich jedes Mal ein Problem, wenn ich versuche, ein Paket zu installieren oder ein veraltetes zu aktualisieren.

Ich habe Distribute aktualisiert, wodurch auch Setuptools aktualisiert werden.


C:\Python33\Scripts\pip-script.py run on 07/30/13 10:55:56
Downloading/unpacking openpyxl

  Getting page https://pypi.python.org/simple/openpyxl/
  URLs to search for versions for openpyxl:
  * https://pypi.python.org/simple/openpyxl/
  Analyzing links from page https://pypi.python.org/simple/openpyxl/
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.4.tar.gz#md5=1c7c750dc2a2fdb8fbdff06d626b0de6 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.4
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.3.tar.gz#md5=dc0ab019f3d3b815c7b811df7b5ea64d (from https://pypi.python.org/simple/openpyxl/), version: 1.5.3
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.5.tar.gz#md5=b74d128eb8bd0df5cb66f0bf4ff581c8 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.5
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.1.0.zip#md5=46eb03d68c15e29b0d7337c0c350f441 (from https://pypi.python.org/simple/openpyxl/), version: 1.1.0
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.2.tar.gz#md5=b9b733405607312c736811d1dac01119 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.2
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.2.3.zip#md5=fd9104954b9b016d92ba5300cbd8a8a7 (from https://pypi.python.org/simple/openpyxl/), version: 1.2.3
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.1.7.zip#md5=37cd161925e34379a0a69a3732325f8b (from https://pypi.python.org/simple/openpyxl/), version: 1.1.7
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.1.5.tar.gz#md5=7da06c60291d888671c2b65be9978ca4 (from https://pypi.python.org/simple/openpyxl/), version: 1.1.5
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.1.6.zip#md5=a71d9715d102ae03b953a7c5005fabed (from https://pypi.python.org/simple/openpyxl/), version: 1.1.6
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.6.1.tar.gz#md5=d0d92b3b8128609be93a044ce3dac3f8 (from https://pypi.python.org/simple/openpyxl/), version: 1.6.1
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.0.tar.gz#md5=5d1a4a6c6747b9d4985211d4738f738d (from https://pypi.python.org/simple/openpyxl/), version: 1.5.0
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.1.tar.gz#md5=acc3c52c9f7340c71f226f840d11b0e7 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.1
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.1.4.zip#md5=e56cfbffddf58fb7a97f43f02e0c931a (from https://pypi.python.org/simple/openpyxl/), version: 1.1.4
    Skipping link https://pypi.python.org/packages/2.6/o/openpyxl/openpyxl-1.1.0-py2.6.egg#md5=6e5740380a9829879b67816c71fc145e (from https://pypi.python.org/simple/openpyxl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.8.tar.gz#md5=a267dd0dd0d4eb49908d7e9cd7a9ee30 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.8
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.6.tar.gz#md5=6b080e13593e57b2e3241b5c242c0bdf (from https://pypi.python.org/simple/openpyxl/), version: 1.5.6
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.5.7.tar.gz#md5=ed1dbbb80878efb8e39e6cefba07bd17 (from https://pypi.python.org/simple/openpyxl/), version: 1.5.7
    Found link https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.6.2.tar.gz#md5=9f24ed772c98f24ae693f8ab6c7b7016 (from https://pypi.python.org/simple/openpyxl/), version: 1.6.2
  Using version 1.6.2 (newest of versions: 1.6.2, 1.6.1, 1.5.8, 1.5.7, 1.5.6, 1.5.5, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5.0, 1.2.3, 1.1.7, 1.1.6, 1.1.5, 1.1.4, 1.1.0)
  Downloading from URL https://pypi.python.org/packages/source/o/openpyxl/openpyxl-1.6.2.tar.gz#md5=9f24ed772c98f24ae693f8ab6c7b7016 (from https://pypi.python.org/simple/openpyxl/)
  Running setup.py egg_info for package openpyxl

    C:\Python33\lib\distutils\dist.py:257: UserWarning: Unknown distribution option: 'tests_require'

      warnings.warn(msg)

    C:\Python33\lib\distutils\dist.py:257: UserWarning: Unknown distribution option: 'test_suite'

      warnings.warn(msg)

    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

       or: -c --help [cmd1 cmd2 ...]

       or: -c --help-commands

       or: -c cmd --help



    error: invalid command 'egg_info'

    Complete output from command python setup.py egg_info:

    C:\Python33\lib\distutils\dist.py:257: UserWarning: Unknown distribution option: 'tests_require'

  warnings.warn(msg)

C:\Python33\lib\distutils\dist.py:257: UserWarning: Unknown distribution option: 'test_suite'

  warnings.warn(msg)

usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

   or: -c --help [cmd1 cmd2 ...]

   or: -c --help-commands

   or: -c cmd --help



error: invalid command 'egg_info'

----------------------------------------

Cleaning up...

  Removing temporary dir c:\users\odhinn\appdata\local\temp\pip-build-Odhinn...
Command python setup.py egg_info failed with error code 1 in c:\users\odhinn\appdata\local\temp\pip-build-Odhinn\openpyxl

Exception information:
Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\pip\basecommand.py", line 134, in main
    status = self.run(options, args)
  File "C:\Python33\lib\site-packages\pip\commands\install.py", line 236, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python33\lib\site-packages\pip\req.py", line 1124, in prepare_files
    req_to_install.run_egg_info()
  File "C:\Python33\lib\site-packages\pip\req.py", line 257, in run_egg_info
    command_desc='python setup.py egg_info')
  File "C:\Python33\lib\site-packages\pip\util.py", line 670, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in 

Python 2.6.5
pip 1.4.1 von /usr/local/lib/python2.6/dist-packages (Python 2.6)
verteilen == 0.7.3

Fehlermeldung:
Ausnahme:
Traceback (letzter Anruf zuletzt):
Datei "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", Zeile 134, in main
status = self.run (Optionen, Argumente)
Datei "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", Zeile 80, wird ausgeführt
self.run_listing (Optionen)
Datei "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", Zeile 127, in run_listing
self.output_package_listing (installierte_Pakete)
Datei "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", Zeile 136, in output_package_listing
if dist_is_editable (dist):
Datei "/usr/local/lib/python2.6/dist-packages/pip/util.py", Zeile 347, in dist_is_editable
req = FrozenRequirement.from_dist (dist, [])
Datei "/usr/local/lib/python2.6/dist-packages/pip/ init .py", Zeile 194, in from_dist
assert len ​​(specs) == 1 und specs [0] [0] == '=='
AssertionError

aber pip == 1.3.1 ist ok

Ich habe den gleichen Fehler erlebt.

root<strong i="6">@server</strong> ~ # pip list
distribute (0.6.14)
Fabric (1.7.0)
iotop (0.4)
MySQL-python (1.2.2)
paramiko (1.11.0)
PIL (1.1.7)
pip (1.4.1)
pycrypto (2.6)
python-memcached (1.45)
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", line 127, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/list.py", line 136, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/local/lib/python2.6/dist-packages/pip/util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/local/lib/python2.6/dist-packages/pip/__init__.py", line 194, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Das Upgrade von Distribute hat funktioniert, danke!

Ich hatte das gleiche Problem und das Upgrade von Distribute funktionierte auch für mich.

Mehr danke für die Pip-Installation -U verteilen

Nachdem die AssertionError mit pip list aufgetreten sind, werden die vorgeschlagenen Fehler pip install -U distribute mit der Meldung "erfordert setuptools> = 0.8 für die Unterstützung von dist-info" behoben. Verwendung und Protokolle unten. Wäre ein pip install -U setuptools angemessen? Ich habe Angst, es selbst auszuprobieren, weil ich mit Pip und dem Abhängigkeitsmanagement nicht sehr erfahren bin. Vielen Dank!

timrdf<strong i="10">@opendap</strong>:~/projects/opendap$ pip list
BeautifulSoup (3.2.1)
ckanclient (0.10)
distribute (0.6.10)
faqt (0.0.2)
html5lib (1.0b3)
isodate (0.4.9)
mod-python (3.3.1)
ordereddict (1.1)
pip (1.5)
pyparsing (1.5.7)
python-apt (0.7.94.2ubuntu6.4)
rdfextras (0.4)
rdflib (3.2.1)
sadi (0.1.5)
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/__init__.py", line 231, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing debug log for failure in /home/timrdf/.pip/pip.log



timrdf<strong i="11">@opendap</strong>:~/projects/opendap$ sudo pip install -U distribute
Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /home/timrdf/.pip/pip.log



timrdf<strong i="12">@opendap</strong>:~/projects/opendap$ cat /home/timrdf/.pip/pip.log
------------------------------------------------------------
/usr/local/bin/pip run on Tue Jan 21 17:10:05 2014
Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/commands/install.py", line 230, in run
    finder = self._build_package_finder(options, index_urls, session)
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/commands/install.py", line 185, in _build_package_finder
    session=session,
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/index.py", line 50, in __init__
    self.use_wheel = use_wheel
  File "/usr/local/lib/python2.6/dist-packages/pip-1.5-py2.6.egg/pip/index.py", line 89, in use_wheel
    raise InstallationError("pip's wheel support requires setuptools >= 0.8 for dist-info support.")
InstallationError: pip's wheel support requires setuptools >= 0.8 for dist-info support.

Schlagen Sie dies einfach auf der neuesten Linux Mint (16) mit der gepackten Version von pip (1.4.1) an, indem Sie einfach pip list . Dieses Problem scheint ziemlich alt zu sein und es scheint keinen Versuch zu geben, es zu beheben. Ist das richtig? Wenn ja, könnte ich einen Riss haben, wenn ich etwas Freizeit habe.

Ich bin auch auf Lubuntu (14.04 LTS) mit pip == 1.5.4 darauf gestoßen. Das Upgrade von Distribute hat jedoch bei mir funktioniert!

@jetheurer Kannst du sagen, welche Distributionsversion du verwendet hast, als du auf den Fehler gestoßen bist?

Dies sollte das neueste Setuptools-Paket sein, das Sie unter http://packages.ubuntu.com/trusty/python-setuptools verwenden sollten, und hoffentlich nichts, was sich Distribute nennt (Distribute wurde jetzt durch Setuptools ersetzt).

@Ivoz Ich verwende derzeit Distribute == 0.7.3 mit Python 2.7.6. Es scheint, dass ich auch setuptools == 0.6c11 installiert habe

@jetheurer Ich bin mir nicht sicher, wie Sie es geschafft haben, solche alten Versionen mit 14.04 zu bekommen. Ich würde vermuten, dass die alten Versionen Ihnen den Fehler verursachen könnten. Vertrauenswürdig sollten normalerweise Setuptools sein. 3.3

Distribute wurde vor einiger Zeit in Setuptools integriert. Als solches möchten Sie im Allgemeinen eine aktuelle Version von Setuptools verwenden (fast alles über Version 1.0 sollte funktionieren!). Neueste Version sehen Sie hier .

Versuchen Sie, alles zu deinstallieren, was Distribute / Setuptools enthält (überprüfen Sie es noch einmal!), Und installieren Sie dann eine neuere Version. Dies wäre meine empfohlene Vorgehensweise.

Ich habe pip mit sudo apt-get install python-pip installiert, aber selbst mit den neuesten pip , distribute und setuptools ich immer noch AssertionError bei Verwendung von pip list oder pip freeze in Ubuntu 14.10. Der Befehl sudo apt-get install python-pip installiert auch Abhängigkeiten: python-colorama , python-distlib , python-html5lib , python-requests und python-wheel . Ich denke, einige dieser Module geben mir AssertionError , also habe ich pip mit allen Abhängigkeiten mit sudo apt-get remove --auto-remove python-pip deinstalliert und dann nur pip mit sudo easy_install pip . Nur so funktioniert es bei mir.

Ich folge dem Kommentar von @arktrin und dies ist gelöst.
Das Folgende ist das Protokoll.

  • Vor
~@cherry-com(7875)$ pip list
adium-theme-ubuntu (0.3.4)
apt-xapian-index (0.45)
argparse (1.2.1)
boto (2.38.0)
bz2file (0.98)
chardet (2.3.0)
colorama (0.2.5)
command-not-found (0.3)
 ....................................
pyserial (2.6)
pysmbc (1.0.14.1)
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 348, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 236, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing debug log for failure in /home/cherry/.pip/pip.log

  • nach
~@cherry-com(7878)$ sudo apt-get remove --auto-remove python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-colorama python-distlib python-html5lib python-pip
0 upgraded, 0 newly installed, 4 to remove and 207 not upgraded.
After this operation, 1,682 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 223180 files and directories currently installed.)
Removing python-pip (1.5.4-1) ...
Removing python-colorama (0.2.5-0.1ubuntu1) ...
Removing python-distlib (0.1.8-1) ...
Removing python-html5lib (0.999-2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
~@cherry-com(7879)$ sudo easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 6.1.1
Downloading https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#md5=6b19e0a934d982a5a4b798e957cb6d45
Processing pip-6.1.1.tar.gz
Writing /tmp/easy_install-MTjyCd/pip-6.1.1/setup.cfg
Running pip-6.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MTjyCd/pip-6.1.1/egg-dist-tmp-1x05jK
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
creating /usr/local/lib/python2.7/dist-packages/pip-6.1.1-py2.7.egg
Extracting pip-6.1.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding pip 6.1.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/pip-6.1.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
~@cherry-com(7880)$ pip freeze
-bash: /usr/bin/pip: No such file or directory
~@cherry-com(7884)$ /usr/local/bin/pip freeze
/usr/local/lib/python2.7/dist-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
adium-theme-ubuntu==0.3.4
apt-xapian-index==0.45
boto==2.38.0
bz2file==0.98
chardet==2.3.0

..............................

Twisted-Web==13.2.0
unity-lens-photos==1.0
urllib3==1.7.1
Werkzeug==0.10.4
xdiagnose===3.6.3build2
zope.interface==4.0.5
~@cherry-com(7885)$

Das Problem ist immer noch in _Ubuntu 15.04, Pip 1.5.6, Distribute-0.7.3_ vorhanden (das Pip-Upgrade von 'Pip' oder 'Distribute' funktioniert nicht, da das Problem Ubuntu-spezifisch zu sein scheint. Siehe unten).

Das Problem:

  • So entfernen Sie das Ubuntu-Paket: sudo apt-get remove --auto-remove python-pip
  • Laden Sie das offizielle Pip-Installationsprogramm herunter: wget https://bootstrap.pypa.io/get-pip.py
  • Installieren Sie pip, indem Sie das heruntergeladene Installationsprogramm ausführen: sudo python get-pip.py
  • Fügen Sie sym-link hinzu, damit es ohne vollständigen Pfad ausgeführt wird: sudo ln -s /usr/local/bin/pip /usr/bin/pip

Getan!


Das Problem protokolliert:

$ sudo pip install -U pip
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.1.1-py2.py3-none-any.whl#md5=172eb5abab25a5e0f7a7b63c7a49378d
  Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.6
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...

$ pip install --upgrade distribute
Downloading/unpacking distribute
  Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
  Running setup.py (path:/tmp/pip-build-ZpdlMd/distribute/setup.py) egg_info for package distribute

Downloading/unpacking setuptools>=0.7 (from distribute)
  Downloading setuptools-16.0-py2.py3-none-any.whl (461kB): 461kB downloaded
Installing collected packages: setuptools, distribute
  Running setup.py install for distribute

Successfully installed setuptools distribute
Cleaning up...

$ pip list
aniso8601 (0.92)
...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 367, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 299, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing debug log for failure in /home/user/.pip/pip.log

@ UzLA Danke! Dies funktioniert auch bei Kubuntu 15.04. Ich habe dafür einen Salzzustand aufgebaut .

@UzLA +1 dafür. Nachdem ich das Ubuntu-Paket entfernt hatte, habe ich easy_install verwendet, anstatt das offizielle Installationsprogramm herunterzuladen, aber mit dem gleichen Effekt :)

@UzLA danke, das hat mir auch bei Lubuntu 15.04 / pip 7.1.0 / python 2.7.9 geholfen.

@UzLA , möchte nur bestätigen, dass dies für mich funktioniert hat, danke.

Das Problem scheint von der veralteten Distribution in Kombination mit einer alten Pip-Version zu stammen.
Es kann sicherlich geschlossen werden.

Außerdem ist der AssertionError in den neuesten Versionen jetzt klarer, da er jetzt die fehlerhafte dist druckt (https://github.com/pypa/pip/blob/develop/pip/__init__.py#L262-L264).
Bezogen auf # 1346.

FWIW: Ich habe mein lokal installiertes Pip pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7) gepatcht, um mir die störende Distanz zu zeigen.

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 367, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 299, in from_dist
    assert len(specs) == 1 and specs[0][0] == '==', (dist, req, specs)
AssertionError: (python-apt 0.9.3.11build1 (/usr/lib/python2.7/dist-packages), Requirement.parse('python-apt===0.9.3.11build1'), [('===', '0.9.3.11build1')])

https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1489443

@arktrins Methode funktioniert für mich in Ubuntu 15.04

Die Methode von @arktrin funktioniert auch bei mir.

pip install über apt-get installiert eine sehr alte Version. Wenn Sie eine neuere Version von pip mit easy_install installieren, wird dieser Fehler nicht angezeigt.

sudo easy_install pip hat meine Pip-Version von 1.5.4 auf 7.1.2 aktualisiert und jetzt funktioniert Pip gut für mich.

Möglicherweise möchten Sie auch setuptools sudo pip install setuptools==7.0 aktualisieren

das hat bei mir funktioniert

@ Kumarardadi Hat auch für mich gearbeitet.

Die Pip-Paketbetreuer sollten wirklich eine neuere Version in die Ubuntu- und Debian-Paket-Repos bekommen.

Wir haben keine Kontrolle darüber, welche Version von Pip Ubuntu und Debian ausgeliefert wird. Wenn Sie eine neuere Version in diesen Repositories wünschen, müssen Sie sich an Ubuntu und Debian wenden und sie danach fragen.

@dstufft Haben Sie Links oder Mailinglisten, mit denen ich Kontakt aufnehmen kann?

https://lists.debian.org/debian-python/ Ist ihre Mailingliste, aber ich vermute nicht, dass sie die bereits veröffentlichten Versionen von Debian / Ubuntu aktualisieren werden. Leider können wir nicht viel tun :(

Im Ubuntu-Launchpad wurde ein Fehlerbericht mit mittlerer Priorität zum Aktualisieren von Pip abgelegt: https://bugs.launchpad.net/pip/+bug/1445947

Der Fehler wurde am 19.04.2015 veröffentlicht, muss aber noch zugewiesen werden. Wenn wir Glück haben, können wir ihn in Ubuntu 16.04 erhalten.

Ich habe folgenden Fehler erhalten:

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 339, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 310, in clobber
    ensure_dir(destdir)
  File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 71, in ensure_dir
    os.makedirs(path)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/urllib3-1.12.dist-info'

Was macht man als nächstes?

@ shruti927

Ich habe folgenden Fehler erhalten:

Was machen ?

Dies scheint völlig unabhängig von diesem Problem zu sein. Öffnen Sie also ein neues?
Aber das sieht nach einem einfachen Berechtigungsproblem aus? Vielleicht sollten Sie --user oder sudo ?

Führen Sie 'sudo pip list' aus
Die Berechtigung wird verweigert, da Sie den Befehl nicht als Root-Benutzer ausgeführt haben


Von: shruti927mailto: [email protected]
Gesendet: 03.12.2015 01:49
An: pypa / pipmailto: [email protected]
Cc: kumardadimailto: [email protected]
Betreff: Re: [pip] Assertion Error mit Pip-Liste (# 1093)

Ich habe folgenden Fehler erhalten:

Traceback (letzter Anruf zuletzt):
Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", Zeile 211, in main
status = self.run (Optionen, Argumente)
Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", Zeile 311, wird ausgeführt
root = options.root_path,
Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", Zeile 646, in Installation
kwargsDatei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", Zeile 803, in Installationself.move_wheel_files (self.source_dir, root = root)Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", Zeile 998, in move_wheel_filesisoliert = selbstisoliert,Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", Zeile 339, in move_wheel_filesclobber (source, lib_dir, True)Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", Zeile 310, in Clobbersure_dir (destdir)Datei "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/utils/ init **. Py", Zeile 71, in sure_dir
os.makedirs (Pfad)
Datei "/usr/lib/python2.7/os.py", Zeile 157, in makedirs
mkdir (Name, Modus)
OSError: [Errno 13] Berechtigung verweigert: '/usr/local/lib/python2.7/dist-packages/urllib3-1.12.dist-info'

Was macht man als nächstes?


Antworte direkt auf diese E-Mail oder sieh sie dir auf GitHub an:
https://github.com/pypa/pip/issues/1093#issuecomment -161421612

@kumardadi Ich habe versucht, den von Ihnen angegebenen Befehl angezeigt :

Das Verzeichnis '/home/shrutika/.cache/pip/http' oder das übergeordnete Verzeichnis gehört nicht dem aktuellen Benutzer und der Cache wurde deaktiviert. Bitte überprüfen Sie die Berechtigungen und den Eigentümer dieses Verzeichnisses. Wenn Sie pip mit sudo ausführen, möchten Sie möglicherweise das Flag -H von sudo

Was ist die -H-Flagge von sudo und was soll ich als nächstes tun?

Führen Sie 'sudo -H pip list' aus, um dies zu lösen
-H dient zum Überschreiben von Cache-Berechtigungen


Von: shruti927mailto: [email protected]
Gesendet: 03.12.2015, 10:16 Uhr
An: pypa / pipmailto: [email protected]
Cc: kumardadimailto: [email protected]
Betreff: Re: [pip] Assertion Error mit Pip-Liste (# 1093)

@kumardadi Ich habe versucht, den von Ihnen angegebenen Befehl angezeigt :

Das Verzeichnis '/home/shrutika/.cache/pip/http' oder das übergeordnete Verzeichnis gehört nicht dem aktuellen Benutzer und der Cache wurde deaktiviert. Bitte überprüfen Sie die Berechtigungen und den Eigentümer dieses Verzeichnisses. Wenn Sie pip mit sudo ausführen, möchten Sie möglicherweise das Flag -H von sudo

Was ist die -H-Flagge von sudo und was soll ich als nächstes tun?


Antworte direkt auf diese E-Mail oder sieh sie dir auf GitHub an:
https://github.com/pypa/pip/issues/1093#issuecomment -161513113

@ Kumarardadi Ich Folgendes :

/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: Ein echter SSLContext Objekt ist nicht verfügbar. Dies verhindert, dass urllib3 SSL entsprechend konfiguriert, und kann dazu führen, dass bestimmte SSL-Verbindungen fehlschlagen. Weitere Informationen finden Sie unter https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

@ shruti927 Welche Version von Pip verwendest du?

pip-7.1.2 und Python 2.7.6

Danke, @UzLA , deine Lösung funktioniert für mich!

@ UzLA Danke, es hat bei mir funktioniert

Gut.

Wie kann ich dieses Problem auf freebsd beheben? Was mache ich falsch?
Ich hoffe ihr könnt mir helfen. Bitte helfen Sie

root<strong i="7">@SickRage</strong>:~ # service sickrage start
sickrage_user: _sabnzbd -> _sabnzbd
sickrage_group: _sabnzbd -> _sabnzbd
sickrage_enable: YES -> YES
sickrage_user: _sabnzbd -> _sabnzbd
sickrage_group: _sabnzbd -> _sabnzbd
sickrage_enable: YES -> YES
Starting sickrage.
Traceback (most recent call last):
  File "/usr/local/sickrage/sickrage/__init__.py", line 208, in main
    from sickrage import core
  File "/usr/local/sickrage/sickrage/core/__init__.py", line 34, in <module>
    from apscheduler.schedulers.tornado import TornadoScheduler
ImportError: No module named apscheduler.schedulers.tornado
Failed to import required libs, please run 'pip install -r /usr/local/sickrage/requirements.txt' from console

@ Gillymoreno Dies scheint der falsche Ort zu sein, um das Problem zu melden. Sie sollten sich direkt an die Entwickler von sickrage wenden.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen