在 Ubuntu 中,为什么我在下载 python 的 usr/bin 时看不到特定版本?



嗨,我正试图获得在虚拟环境中工作的特定版本的python

我尝试了这些解决方案:

https://askubuntu.com/questions/682869/how-do-i-install-a-different-python-version-using-apt-get

我没有编译答案,因为这样做看起来会摆脱我的"old"python的新版本。

所以我最关心的是第一个答案。我这样做了:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.3

它似乎可以工作,虽然我没有得到一个"python3.3是安装的消息"或者不管它应该是什么样子:

sudo apt-get install python3.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'python3-3parclient' for regex 'python3.3'
The following additional packages will be installed:
python3-dnspython python3-eventlet python3-greenlet
Suggested packages:
python-eventlet-doc python-greenlet-doc python-greenlet-dev
python3-greenlet-dbg
The following NEW packages will be installed:
python3-3parclient python3-dnspython python3-eventlet python3-greenlet
0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded.
Need to get 316 kB of archives.
After this operation, 1,867 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-greenlet amd64 0.4.15-4.1 [15.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-dnspython all 1.16.0-1build1 [89.1 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-eventlet all 0.25.1-2ubuntu1 [154 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-3parclient all 4.2.11-0ubuntu1 [57.4 kB]
Fetched 316 kB in 0s (1,007 kB/s)            
Selecting previously unselected package python3-greenlet.
(Reading database ... 212769 files and directories currently installed.)
Preparing to unpack .../python3-greenlet_0.4.15-4.1_amd64.deb ...
Unpacking python3-greenlet (0.4.15-4.1) ...
Selecting previously unselected package python3-dnspython.
Preparing to unpack .../python3-dnspython_1.16.0-1build1_all.deb ...
Unpacking python3-dnspython (1.16.0-1build1) ...
Selecting previously unselected package python3-eventlet.
Preparing to unpack .../python3-eventlet_0.25.1-2ubuntu1_all.deb ...
Unpacking python3-eventlet (0.25.1-2ubuntu1) ...
Selecting previously unselected package python3-3parclient.
Preparing to unpack .../python3-3parclient_4.2.11-0ubuntu1_all.deb ...
Unpacking python3-3parclient (4.2.11-0ubuntu1) ...
Setting up python3-greenlet (0.4.15-4.1) ...
Setting up python3-dnspython (1.16.0-1build1) ...
Setting up python3-eventlet (0.25.1-2ubuntu1) ...
/usr/lib/python3/dist-packages/eventlet/db_pool.py:78: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.max_age is 0 or self.max_idle is 0:
/usr/lib/python3/dist-packages/eventlet/db_pool.py:78: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.max_age is 0 or self.max_idle is 0:
Setting up python3-3parclient (4.2.11-0ubuntu1) ...
/usr/lib/python3/dist-packages/hpe3parclient/http.py:278: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.tries is 0:

完成后,我期望python 3.3在usr/bin中可用,这样我就可以用它设置一个virtualenv,但它没有。我是不是漏了一步?

谢谢!

我发现3.3和我的ubuntu 20.04不兼容。我想因为我的python2.7工作,我可以直接升级到3.3没有问题。我猜只有2.7版本在那里,因为它是从旧的ubuntu遗留下来的。

无论如何,python3.5为我工作!

我假设你使用的是ubuntu 20.04

不幸的是,没有资金,我不能在20.04上提供python<3.5的包,因为这些版本从未收到libssl1.1补丁。我可以自己修补它们,但那是很多工作,我不能合理地做免费。所以在20.04版本中,你需要使用python3.5+

原因&;某事&;安装的是apt-get";很有帮助";将包名规范化为完全不相关的名称:

Note, selecting 'python3-3parclient' for regex 'python3.3'

免责声明:我维护deadsnakes

最新更新