第一步:下载python2.7相关版本源码(例如:Python-2.18.4.tgz)
地址:https://www.python.org/downloads/release/python-2718/
第二步:安装
1) 解压
tar zxvf Python-2.7.18.tar.tgz
cd Python-2.7.18
gcc --version
#若不存在进行安装
apt-get install gcc
gcc (Debian 12.2.0-3) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ --version
#若不存在进行安装
apt-get install g++
g++ (Debian 12.2.0-3) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
./configure
make
make install
python
Python 2.7.18 (default, Nov 2 2022, 15:29:52)
[GCC 12.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
bash: pip3: command not found
问题描述:
当使用命令pip3 install XXX,
出现错误bash: pip3: command not found
错误原因:pip3
还没有安装
解决方法:
安装 pip3
sudo apt install python3-pip
直接使用apt–get安装
apt-get install python2
原文地址:https://blog.csdn.net/qq_44732146/article/details/127652725
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_40112.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。