本文教你在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版本。
相关主题 |