本文教你在Fedora 29操作系统中安装Python 3.8 alpha的方法。
在Fedora安装Python 3.8
如果你有Fedora 29或更新的Fedora版本,可以使用dnf(参考dnf命令_Linux dnf命令使用详解:新一代的RPM软件包管理器)从官方软件存储库安装Python 3.8,运行以下命令:
$ sudo dnf install python38
等待命令执行完毕即可。
使用Python 3.8测试项目
运行python3.8命令以使用Python 3.8或使用内置的venv模块、tox或pipenv创建虚拟环境(参考使用pip在Manjaro系统中安装pipenv的方法),例如:
$ git clone https://github.com/benjaminp/six.git
Cloning into 'six'...
$ cd six/
$ tox -e py38
py38 runtests: commands[0] | python -m pytest -rfsxX
================== test session starts ===================
platform Linux -- Python 3.8.0a1, pytest-4.2.1, py-1.7.0, pluggy-0.8.1
collected 195 items
test_six.py ...................................... [ 19%]
.................................................. [ 45%]
.................................................. [ 70%]
..............................................s... [ 96%]
.................................................. [100%]
========= 194 passed, 1 skipped in 0.25 seconds ==========
________________________ summary _________________________
py38: commands succeeded
congratulations
所安装的Python 3.8版本
运行python3.8命令查看:
$ python3.8
Python 3.8.0a1 (default, Feb 7 2019, 08:07:33)
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on Linux
Type "help", "copyright", "credits" or "license" for more information.
>>> while not (answer := input('Say something: ')):
... print("I don't like empty answers, try again...")
...
Say something:
I don't like empty answers, try again...
Say something: Fedora
>>>
根据上面的结果显示,所安装的是Python 3.8 alpha版本。
- 1 玩客云刷armbian架设nginx php mysql 及可道私有云总结
- 2 centos安装好mysql但是无法启动问题(Job for mysqld.service failed because the control process exited with error code.)
- 3 Ubuntu缺少libncurses.so.5的解决办法
- 4 Grafana之Gauge和Bar Gauge使用(第十一篇)
- 5 RHEL 8 安装 Oracle 19c 提示缺少 libnsl.so.1
- 6 df空间占用已满,但du查看home目录空间占用却很少
- 7 linux-kernel – 将设备树中断标志映射到devm_request_irq
- 8 vim.fault.GenericVmConfigFault
- 9 cron: can’t lock /var/run/crond.pid, otherpid may be 2699: Resource temporarily unavailable
- 10 CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(二)
精彩评论