首页 » Linux » CentOS » pip3安装Cheetah报错

pip3安装Cheetah报错

 

pip3在安装Cheetah时报错,报错内容如下:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting Cheetah
Downloading Cheetah-2.4.4.tar.gz (190 kB)
|████████████████████████████████| 190 kB 440 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_17540ca09f1f4d858f2ce89dd3a8e08f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_17540ca09f1f4d858f2ce89dd3a8e08f/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 /tmp/pip-pip-egg-info-jkagwuig
cwd: /tmp/pip-install-3ff27jtd/cheetah_17540ca09f1f4d858f2ce89dd3a8e08f/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_17540ca09f1f4d858f2ce89dd3a8e08f/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_17540ca09f1f4d858f2ce89dd3a8e08f/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz#sha256=be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.4.3.tar.gz (190 kB)
|████████████████████████████████| 190 kB 3.0 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_e1459000adc842519655f9b0ea3cf2cd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_e1459000adc842519655f9b0ea3cf2cd/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 /tmp/pip-pip-egg-info-0adt_bn_
cwd: /tmp/pip-install-3ff27jtd/cheetah_e1459000adc842519655f9b0ea3cf2cd/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_e1459000adc842519655f9b0ea3cf2cd/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_e1459000adc842519655f9b0ea3cf2cd/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/67/9f/223348672fae7cb655f67d4a9a1f9c5cb1237bd2f0a83f56606800a00480/Cheetah-2.4.3.tar.gz#sha256=1b450a05807fb497ba7b52ed814db95f91c6d6f56f4908bab707a0bcaf36f9b5 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.4.2.1.tar.gz (189 kB)
|████████████████████████████████| 189 kB 5.3 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_a640e33a9ed64074b907ee0c8b754b17/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_a640e33a9ed64074b907ee0c8b754b17/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 /tmp/pip-pip-egg-info-hwnybvbt
cwd: /tmp/pip-install-3ff27jtd/cheetah_a640e33a9ed64074b907ee0c8b754b17/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_a640e33a9ed64074b907ee0c8b754b17/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_a640e33a9ed64074b907ee0c8b754b17/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/98/8e/3e43010314026cd41cc73eecdaf8a07fbb90c9f69814fbd7fe2bab41a35e/Cheetah-2.4.2.1.tar.gz#sha256=adb3a2ec738fc154c29bedf6c4d633338fdd7cec44206ba0efdd6a99343fc5fc (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.4.2.tar.gz (188 kB)
|████████████████████████████████| 188 kB 5.4 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_8dabf0858f104b20bbe26ba9c4df96bf/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_8dabf0858f104b20bbe26ba9c4df96bf/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 /tmp/pip-pip-egg-info-heerurnu
cwd: /tmp/pip-install-3ff27jtd/cheetah_8dabf0858f104b20bbe26ba9c4df96bf/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_8dabf0858f104b20bbe26ba9c4df96bf/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_8dabf0858f104b20bbe26ba9c4df96bf/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3a/83/ce67008e0e1dcc6c75560a3d878947401f31b00fd1f1c8550a3441b36c9e/Cheetah-2.4.2.tar.gz#sha256=cf06c324b756a319baf8a1ef9e9363688752b2cf44d53dc31c38833b37f98c3f (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.4.1.tar.gz (194 kB)
|████████████████████████████████| 194 kB 5.4 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_91aab9bfe15447ff941643da50712a7a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_91aab9bfe15447ff941643da50712a7a/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 /tmp/pip-pip-egg-info-rmhl7sm_
cwd: /tmp/pip-install-3ff27jtd/cheetah_91aab9bfe15447ff941643da50712a7a/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_91aab9bfe15447ff941643da50712a7a/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_91aab9bfe15447ff941643da50712a7a/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bc/fe/4b9c81d744d3a0edbaa1f14b2c9a690c82bee129ab0bf510dbc9e11ad1d3/Cheetah-2.4.1.tar.gz#sha256=efed96a28384750d586d29accf88fea23c44dbb20a479aa7607d30a80dcea2c8 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.4.0.tar.gz (202 kB)
|████████████████████████████████| 202 kB 5.1 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_e693d8632b3341b4aaa2263faf40efcc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_e693d8632b3341b4aaa2263faf40efcc/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 /tmp/pip-pip-egg-info-eemtgwtl
cwd: /tmp/pip-install-3ff27jtd/cheetah_e693d8632b3341b4aaa2263faf40efcc/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_e693d8632b3341b4aaa2263faf40efcc/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_e693d8632b3341b4aaa2263faf40efcc/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/97/1e/2d0dcc8accdfdd9d05582244109f8b5706f729703221c42c322e05f54bc1/Cheetah-2.4.0.tar.gz#sha256=ef804ae0bb2ca4cebf1efde7093e6d80799c11ab807c742e89db9d59b893dc92 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.3.0.tar.gz (202 kB)
|████████████████████████████████| 202 kB 5.7 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_3ef2edf4c83e4adcb6428fcc9e4feb09/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_3ef2edf4c83e4adcb6428fcc9e4feb09/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 /tmp/pip-pip-egg-info-jpc8hygz
cwd: /tmp/pip-install-3ff27jtd/cheetah_3ef2edf4c83e4adcb6428fcc9e4feb09/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_3ef2edf4c83e4adcb6428fcc9e4feb09/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_3ef2edf4c83e4adcb6428fcc9e4feb09/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/b4/18/a9b2f0f09e99024f4a9ea1ab80b6807aaecb7d1552529ea3590ad3d7bc93/Cheetah-2.3.0.tar.gz#sha256=2a32d7f7f70be98c2d57aa581f979bc799d4bf17d09fc0e7d77280501edf3e53 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.2.2.tar.gz (202 kB)
|████████████████████████████████| 202 kB 6.0 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_2fca2fb899f34ba7ba1d0584d563665b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_2fca2fb899f34ba7ba1d0584d563665b/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 /tmp/pip-pip-egg-info-_lqbl7w8
cwd: /tmp/pip-install-3ff27jtd/cheetah_2fca2fb899f34ba7ba1d0584d563665b/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_2fca2fb899f34ba7ba1d0584d563665b/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_2fca2fb899f34ba7ba1d0584d563665b/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e9/f7/ff5c36b69cce6f13e89e1a537fae1ec00f79eed411a78c000e1889adaeab/Cheetah-2.2.2.tar.gz#sha256=00d6f8855ba337c9fc76b6fcd8e411af80a5bbc9efc09e5ce5603d9d7e1cc2f9 (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-2.2.1.tar.gz (243 kB)
|████████████████████████████████| 243 kB 6.0 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_221aa3e77b6041589e436aae442a54a9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_221aa3e77b6041589e436aae442a54a9/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 /tmp/pip-pip-egg-info-gnf9ecbr
cwd: /tmp/pip-install-3ff27jtd/cheetah_221aa3e77b6041589e436aae442a54a9/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_221aa3e77b6041589e436aae442a54a9/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_221aa3e77b6041589e436aae442a54a9/SetupTools.py", line 64
raise ValueError, 'The entries in "data_files" must be strings'
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/15/57/d6edf14825fbaa29abfe4b7d38f6fde5844461c1a0e8d1dca8b3b5c613a1/Cheetah-2.2.1.tar.gz#sha256=9c2a3862c465fd860db13bc066c3f643610081b538d0e38f3fccbb7742faf87d (from https://pypi.org/simple/cheetah/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Cheetah-1.0.tar.gz (149 kB)
|████████████████████████████████| 149 kB 7.2 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ff27jtd/cheetah_2af8d517fc14428fae99e8fbfc1c2445/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ff27jtd/cheetah_2af8d517fc14428fae99e8fbfc1c2445/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 /tmp/pip-pip-egg-info-5ciikxcr
cwd: /tmp/pip-install-3ff27jtd/cheetah_2af8d517fc14428fae99e8fbfc1c2445/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-3ff27jtd/cheetah_2af8d517fc14428fae99e8fbfc1c2445/setup.py", line 10, in
import SetupTools
File "/tmp/pip-install-3ff27jtd/cheetah_2af8d517fc14428fae99e8fbfc1c2445/SetupTools.py", line 66
raise ValueError, 'The entries in "data_files" must be strings'
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/58/11/8e555b6e9ddb8d3a9e200139abd4fc904e0abd05841e72e3970bdf9b04dd/Cheetah-1.0.tar.gz#sha256=ec27eff76846ec95cea4e156fbeac951946b6eb1d1b3e590e48c03904a625893 (from https://pypi.org/simple/cheetah/). 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 Cheetah (from versions: 1.0, 2.0rc7, 2.2.1, 2.2.2, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.4.2.1, 2.4.3, 2.4.4)
ERROR: No matching distribution found for Cheetah

这是因为Cheetah版本过旧,最后一次更新是在2012年,现已使用新的包“Cheetah3”

解决办法:

 

原文链接:pip3安装Cheetah报错,转载请注明来源!

0