簡體   English   中英

安裝python模塊時出錯

[英]Errors while installing python modules

PS C:\Users\user> pip install getotp
Collecting getotp
  Using cached getotp-0.0.3.tar.gz (3.4 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_f69bcd40d10d4267bbd1b13984d749e6\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_f69bcd40d10d4267bbd1b13984d749e6\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user\AppData\Local\Temp\pip-pip-egg-info-umisjc6r'
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_f69bcd40d10d4267bbd1b13984d749e6\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_f69bcd40d10d4267bbd1b13984d749e6\setup.py", line 6, in <module>
        execfile('getotp/version.py')
    NameError: name 'execfile' is not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a2/dc/6d3cea111d7f77ee7bc222928c176b7d44d9478685e0d1496656be7259d6/getotp-0.0.3.tar.gz#sha256=acf785f72fafb431997f52c67c07645ca78d1c1e464fcc95a313b0649cf7ecd4 (from https://pypi.org/simple/getotp/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached getotp-0.0.2.tar.gz (3.4 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_3e06d6eb791c4df9a1f09d94a9717ef7\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_3e06d6eb791c4df9a1f09d94a9717ef7\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user\AppData\Local\Temp\pip-pip-egg-info-q1vmndlz'
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_3e06d6eb791c4df9a1f09d94a9717ef7\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_3e06d6eb791c4df9a1f09d94a9717ef7\setup.py", line 6, in <module>
        execfile('getotp/version.py')
    NameError: name 'execfile' is not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fa/3d/43c5ad39ce25cfcbeb7bc41537c59c02ec8a06c10cd3592ef386038e23cb/getotp-0.0.2.tar.gz#sha256=5490fa2a61807d67b0010f0c9e2657a7866e8b026a7576101e5a3c5367a5a80a (from https://pypi.org/simple/getotp/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached getotp-0.0.1.tar.gz (3.2 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_e7a9683866eb4524b60b3692308caf48\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-nrr48slj\\getotp_e7a9683866eb4524b60b3692308caf48\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user\AppData\Local\Temp\pip-pip-egg-info-9dl6hatg'
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_e7a9683866eb4524b60b3692308caf48\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip-install-nrr48slj\getotp_e7a9683866eb4524b60b3692308caf48\setup.py", line 6, in <module>
        execfile('getotp/version.py')
    NameError: name 'execfile' is not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cd/0e/41efe822de7656c0f8874276e9e06a42e7b941b8029a7678f9cb71cbc03b/getotp-0.0.1.tar.gz#sha256=8199e2d6f3198ce14ee5d9af39f9e4bc581c9b67fb3bad4fb412773095531883 (from https://pypi.org/simple/getotp/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement getotp (from versions: 0.0.1, 0.0.2, 0.0.3)
ERROR: No matching distribution found for getotp

安裝軟件包時出現此錯誤

該軟件包來自 2014 年,是為 python2 編寫的。 幸運的是,代碼不是很長。 您可以從pypi下載 .tar.gz 或克隆 github [repo]( https://github.com/gmjosack/getotp] 。然后手動檢查代碼(或在每個 .py 文件上使用2to3 )並制作它與python3兼容並運行

python setup.py install

當你完成時。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM