全球主机交流论坛

标题: 悬赏100请教linux安装python3 [打印本页]

作者: jiangyi    时间: 2024-5-24 23:12
标题: 悬赏100请教linux安装python3
  1. # uname -a
  2. Linux lnas0b4d 4.4.18-g8bcbd8a-dirty #172 SMP Thu Jun 18 15:45:32 CST 2020 aarch64 GNU/Linux
复制代码


联想个人云A1 linux系统,带python2 需要安装python3
请高手指点,100元不成敬意

TG @wudaima
作者: 若志    时间: 2024-5-24 23:16
TG发你了
作者: 交配交的人    时间: 2024-5-24 23:18
这神仙也是买来的吧
作者: ddzyx    时间: 2024-5-24 23:20
https://www.bt.cn/new/download.html  装完宝塔自带各种版本的python3
作者: zhouktv1    时间: 2024-5-24 23:21
本帖最后由 zhouktv1 于 2024-5-24 23:23 编辑

chatgpt解忧愁

  1. To install Python 3 on a Linux system, you can follow these general steps. The specific commands may vary slightly depending on your distribution. Here, I'll provide instructions for installing Python 3 on a Debian-based system using `apt`, and on a Red Hat-based system using `yum`. Since you're using a custom Linux distribution on an ARM architecture (aarch64), some steps may require slight adjustments.

  2. ### For Debian-based systems (Ubuntu, Debian, etc.)
  3. 1. **Update the package list**:
  4.    ```bash
  5.    sudo apt update
  6.    ```

  7. 2. **Install Python 3**:
  8.    ```bash
  9.    sudo apt install python3
  10.    ```

  11. 3. **Verify the installation**:
  12.    ```bash
  13.    python3 --version
  14.    ```

  15. ### For Red Hat-based systems (CentOS, Fedora, etc.)
  16. 1. **Update the package list**:
  17.    ```bash
  18.    sudo yum update
  19.    ```

  20. 2. **Install Python 3**:
  21.    ```bash
  22.    sudo yum install python3
  23.    ```

  24. 3. **Verify the installation**:
  25.    ```bash
  26.    python3 --version
  27.    ```

  28. ### For Custom Linux Distributions or ARM Architecture

  29. Since you're on a custom Linux distribution on an ARM architecture, you might need to build Python from source:

  30. 1. **Install necessary build tools and dependencies**:
  31.    ```bash
  32.    sudo apt update
  33.    sudo apt install build-essential libssl-dev libffi-dev zlib1g-dev
  34.    ```

  35. 2. **Download the latest Python 3 source code**:
  36.    ```bash
  37.    wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz
  38.    tar -xf Python-3.10.4.tgz
  39.    cd Python-3.10.4
  40.    ```

  41. 3. **Configure the build environment**:
  42.    ```bash
  43.    ./configure --enable-optimizations
  44.    ```

  45. 4. **Build and install Python 3**:
  46.    ```bash
  47.    make -j 4  # Adjust the number based on your CPU cores
  48.    sudo make altinstall
  49.    ```

  50. 5. **Verify the installation**:
  51.    ```bash
  52.    python3.10 --version
  53.    ```

  54. ### Additional Steps (if needed)
  55. - **Create a symbolic link** (optional if you want to use `python3` as a command):
  56.   ```bash
  57.   sudo ln -s /usr/local/bin/python3.10 /usr/bin/python3
  58.   ```

  59. - **Install `pip` for Python 3**:
  60.   ```bash
  61.   sudo apt install python3-pip
  62.   ```

  63. These instructions should help you install Python 3 on your system. If you encounter any issues or need specific adjustments, feel free to ask!
复制代码

作者: jiangyi    时间: 2024-5-24 23:54
交配交的人 发表于 2024-5-24 23:18
这神仙也是买来的吧

朋友 , 求助, 联系一下我呗
作者: jiangyi    时间: 2024-5-25 00:34
继续求救, 论坛的朋友都很热情  
作者: BigBug    时间: 2024-5-25 00:36
装个宝塔面板 一键安装的  然后就可以随便安装版本了
作者: jiangyi    时间: 2024-5-25 01:13
重点是没有编译器
作者: aru    时间: 2024-5-25 01:22
我感觉可能是debian 改的
执行下这2个命令,看内容是什么
cat /etc/debian_version
cat /etc/issue
作者: jiangyi    时间: 2024-5-26 19:16
感谢https://t.me/zixunshi,真高手,搞定了
作者: LarryDow    时间: 2024-5-26 20:00
多问问chatgpt
作者: yanzhiling2002    时间: 2024-5-26 20:48
神仙咋上来的
作者: jiangyi    时间: 2024-5-27 03:40
yanzhiling2002 发表于 2024-5-26 20:48
神仙咋上来的

兄弟做人留一线,我敢打包票,这个问题你搞不定,不是一般的复杂
作者: LoliR    时间: 2024-5-27 07:58
编译安装就行了,只是慢一点,问题不大
作者: yanzhiling2002    时间: 2024-5-27 13:13
本帖最后由 yanzhiling2002 于 2024-5-27 13:21 编辑
jiangyi 发表于 2024-5-27 03:40
兄弟做人留一线,我敢打包票,这个问题你搞不定,不是一般的复杂


阿哲,激起了我的好胜心,我真想试试的,可惜已经解决了,下次吧




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4