deepin是否支持python3.8?
Tofloor
poster avatar
zhaomingwei
deepin
2020-09-17 23:51
Author
vs用python3。8报错,现在可否支持
Reply Favorite View the author
All Replies
阿措
deepin
2020-09-17 23:53
#1
命令行支持
Reply View the author
残念
deepin
2020-09-17 23:57
#2
系统默认的是3.7.3
推荐使用anaconda
Reply View the author
zhaomingwei
deepin
2020-09-18 00:03
#3
https://bbs.deepin.org/post/202364
系统默认的是3.7.3
推荐使用anaconda

我一直没有安装成功呢,忽然感觉好难,
Reply View the author
观摩
deepin
2020-09-18 00:12
#4
如果不想折腾  conda 之类的环境,可以自己直接安装 3.8
Reply View the author
zhaomingwei
deepin
2020-09-18 00:45
#5
https://bbs.deepin.org/post/202364
如果不想折腾  conda 之类的环境,可以自己直接安装 3.8

这个报错啊。
Reply View the author
nocmt
deepin
2020-09-18 03:36
#6
安装Miniconda

直接浏览器下载:https://repo.anaconda.com/minico ... est-Linux-x86_64.sh

终端执行:./Miniconda3-latest-Linux-x86_64.sh

按照提示安装即可。

使用教程:https://www.baidu.com/s?ie=UTF-8&wd=conda%E6%95%99%E7%A8%8B
Reply View the author
Hello
deepin
2020-09-18 05:15
#7
亲,别听他们的,这些conda都落后了,用pyenv吧
Reply View the author
deepinuser17
deepin
2020-09-18 07:02
#8
本帖最后由 deepinuser17 于 2020-9-17 23:04 编辑

编译方法:

  1. export python_version=3.8.5
  2. sudo apt install libffi-dev
  3. wget -P/tmp https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz
  4. cd /tmp
  5. tar xvf Python-${python_version}.tar.xz
  6. cd Python-${python_version}
  7. ./configure --prefix=/usr/local/Python-${python_version} --with-openssl=/usr
  8. make -j4
  9. sudo make install
  10. echo "" >> ~/.bashrc
  11. echo "# Set environment for Python" >> ~/.bashrc
  12. echo "export LD_LIBRARY_PATH=/usr/local/Python-${python_version}/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
  13. echo "export PATH=/usr/local/Python-${python_version}/bin:\$PATH" >> ~/.bashrc
  14. source ~/.bashrc
Copy the Code


可以写成一个shell脚本,运行。如果需要安装不同的版本。只需要改python_version 变量。
  1. #!/bin/bash

  2. # Set Python version to be installed
  3. export python_version=3.8.5

  4. # Install dependency package
  5. sudo apt install libffi-dev

  6. # Download Python tarball
  7. wget -P/tmp https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz

  8. # Build and install Python
  9. cd /tmp
  10. tar xvf Python-${python_version}.tgz
  11. cd Python-${python_version}
  12. ./configure --prefix=/usr/local/Python-${python_version} --with-openssl=/usr
  13. make -j2
  14. sudo make install

  15. # Set environment for using new Python
  16. echo "" >> ~/.bashrc
  17. echo "# Set environment for Python" >> ~/.bashrc
  18. echo "export LD_LIBRARY_PATH=/usr/local/Python-${python_version}/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc
  19. echo "export PATH=/usr/local/Python-${python_version}/bin:\$PATH" >> ~/.bashrc
  20. source ~/.bashrc
Copy the Code

Reply View the author
LMVISION
deepin
2020-09-18 21:49
#9
自下载python源码编译也简单,我就是用的38
Reply View the author