-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip安装失败 #54
Comments
看看是什么版本? |
ubuntu 20.04系统默认是py3.8, 通过conda装了py2, py37,都试了下,报同样的错误 |
https://github.com/kuoruan/shell-scripts/blob/master/kcptun/kcptun.sh#L807 脚本会先执行 |
换了个centos 7.x,还是报一样的问题 |
|
又换了个服务器,centos 7.x, 系统自带的Python,新的问题是pip有问题 ++ echo 2.7.5
++ cut -d. -f1
+ local major_version=2
++ echo 2.7.5
++ cut -d. -f2
+ local minor_version=7
+ '[' -z 2 ']'
+ '[' -z 7 ']'
+ is_number 2
+ expr 2 + 1
+ local is_python_26=false
+ '[' 2 -lt 2 ']'
+ '[' 2 = 2 ']'
+ '[' 7 -lt 6 ']'
+ '[' 2 = 2 ']'
+ '[' 7 = 6 ']'
+ command_exists pip
+ command -v pip
+ command_exists pip
+ command -v pip
+ pip --version
+ cat
检测到当前环境的 pip 命令已损坏,
请检查你的 python 环境。
+ exit 1
[root@ ~]# command -v python
/usr/bin/python
[root@xxx ~]#
[root@xxx ~]#
[root@xxx ~]#
[root@xxx ~]#
[root@xxx ~]# python
Python 2.7.5 (default, Nov 16 2020, 22:23:17)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
[root@xxx ~]# command -v pip
/usr/bin/pip
[root@xxx ~]# pip -V
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
[root@xxx ~]# pip install readline
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
|
|
服务器是ubuntu 20.04, python3.8, python3.7, python2都试过了,报下面的错误:
环境已经有pip了,为啥还要get-pip.py | python ?
The text was updated successfully, but these errors were encountered: