1. 程式人生 > 實用技巧 >python3安裝poster庫時報錯解決:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

python3安裝poster庫時報錯解決:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

D:\Python\Python37-32\test>pip install poster
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting poster
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/9f/dc/0683a458d21c3d561ab2f71b4fcdd812bf04e55c54e560b0854cea95610e/poster-0.8.1.tar.gz (12 kB)
    ERROR: Command errored out with exit status 
1: command: 'd:\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jj\\AppData\\Local\\Temp\\pip-install-fw4y09fd\\poster\\setup.py'"'"'; __file__='"'"'C:\\Users\\jj\\AppData\\Local\\Temp\\pip-install-fw4y09fd\\poster\\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\jj\AppData\Local\Temp\pip-pip-egg-info-ikqytp8b' cwd: C:\Users\jj\AppData\Local\Temp\pip-install-fw4y09fd\poster\ Complete output (
10 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\jj\AppData\Local\Temp\pip-install-fw4y09fd\poster\setup.py", line 2, in <module> import poster File "C:\Users\jj\AppData\Local\Temp\pip-install-fw4y09fd\poster\poster\__init__.py", line 29, in <module> import poster.streaminghttp File "C:\Users\jj\AppData\Local\Temp\pip-install-fw4y09fd\poster\poster\streaminghttp.py", line 61 print "send:", repr(value) ^ SyntaxError: invalid syntax ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

很多從網上拷貝的python指令碼是2.x版本寫的,用的庫也是2.x,所有要換成3.x的庫和語法!!

換成poster3就OK了!!相應的程式碼中的所有poster替換成poster3:

全部替換成poster3:

參考:

python3安裝poster報錯_qq_41663800的部落格-CSDN部落格_python3 poster

python pip install poster gives me error --> Command "python setup.py egg_info" failed with error code 1 in C:\Users\ - Stack Overflow