„pip install“ ist bei der Installation des Opts-Moduls in Python für Windows defekt

„pip install“ ist bei der Installation des Opts-Moduls in Python für Windows defekt

Ich erhalte eine Fehlerkette, wenn ich versuche zu installierenOptionenauf Pythons eigenem pipSkript im Python34Ordner. Irgendwie gelingt die Installation nicht.

Folgende Optionen werden ausprobiert:

----------------------------------->>>
Downloading/unpacking opts
  Downloading opts-0.1.1.tar.gz
  Running setup.py (path:C:\Users\user\AppData\Local\Temp\pip_build_user\opts\setup.py) egg_info for package opts
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip_build_user\opts\setup.py", line 3, in <module>
        from distribute_setup import use_setuptools
    ImportError: No module named 'distribute_setup'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "C:\Users\user\AppData\Local\Temp\pip_build_user\opts\setup.py", line 3, in <module>

    from distribute_setup import use_setuptools

ImportError: No module named 'distribute_setup'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip_build_user\opts
Storing debug log for failure in C:\Users\user\pip\pip.log

Ich versuche zu installieren distribute_setup:

 ---------->

C:\Python34\Scripts>pip install distribute_setup
Downloading/unpacking distribute-setup
  Could not find any downloads that satisfy the requirement distribute-setup
Cleaning up...
No distributions at all found for distribute-setup
Storing debug log for failure in C:\Users\user\pip\pip.log

Die Datei pip.log:

 ---------->
C:\Python34\Scripts\pip run on 08/17/19 02:17:45
Downloading/unpacking distribute-setup
  Getting page https://pypi.python.org/simple/distribute_setup/
  Could not fetch URL https://pypi.python.org/simple/distribute_setup/: 404 Client Error: Not Found
  Will skip URL https://pypi.python.org/simple/distribute_setup/ when looking for download links for distribute-setup
  Getting page https://pypi.python.org/simple/
  URLs to search for versions for distribute-setup:
  * https://pypi.python.org/simple/distribute_setup/
  Getting page https://pypi.python.org/simple/distribute_setup/
  Could not fetch URL https://pypi.python.org/simple/distribute_setup/: 404 Client Error: Not Found
  Will skip URL https://pypi.python.org/simple/distribute_setup/ when looking for download links for distribute-setup
  Could not find any downloads that satisfy the requirement distribute-setup
Cleaning up...
  Removing temporary dir C:\Users\user\AppData\Local\Temp\pip_build_user...
No distributions at all found for distribute-setup
Exception information:
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python34\lib\site-packages\pip\req.py", line 1177, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "C:\Python34\lib\site-packages\pip\index.py", line 277, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
pip.exceptions.DistributionNotFound: No distributions at all found for distribute-setup

Antwort1

pip installist irgendwie kaputt[.]

Dies erscheint unwahrscheinlich.

Ich erhalte die gleichen Fehler sowohl in Python 2.7.16 als auch in Python 3.x mit relativ aktuellen Versionen pip( pipVersion 18.x bzw. pipVersion 19.x). pipAnsonsten funktioniert es bei mir normal.

Wahrscheinlicher ist, dass es optssich um ein altes Modul handelt, das in seinen Skripten veraltete Referenzen und Anweisungen verwendet, die Fehler verursachen.

Was das Alter betrifft, bedenken Sie, dassopts wurde 2010 veröffentlicht,zusammen mit Python 2.7und das derzeitder offizielle Support für Python 2.7 endet voraussichtlich im Januar 2020.


Als Vorschlag: Wenn dies nicht nur ein Supportmodul für ein vorhandenes Skript ist, sollten Sie möglicherweise etwas anderes als verwenden opts. Eine Option könnte Pythons eigenes seinargparseBibliothek.


verwandte Informationen