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\\xx\\AppData\\Local\\Temp\\pip-install-fw4y09fd\\poster\\setup.py'"'"'; __file__='"'"'C:\\Users\\xx\\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\xx\AppData\Local\Temp\pip-pip-egg-info-ikqytp8b' cwd: C:\Users\xx\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\xx\AppData\Local\Temp\pip-install-fw4y09fd\poster\setup.py", line 2, in <module> import poster File "C:\Users\xx\AppData\Local\Temp\pip-install-fw4y09fd\poster\poster\__init__.py", line 29, in <module> import poster.streaminghttp File "C:\Users\xx\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:
参考:
MU5735 R.I.P