默认
Python3.8 安装
Nuitka使用
自检工具常见问题
python 提权
Git 打补丁-- patch 和 diff 的使用
ssh 端口转发
Ubuntu常用操作
gitea安装
ubuntu添加pycharm快捷方式
常用链接
DTHouse测试
test
GIT 常用操作
groovyScript 使用
Kafka 常用操作
Postgres 日期操作
硬盘读写测试
安装nodejs
dthouse打包
postgresql 主从复制
Bandit 代码安全检测
odoo安全
License相关
人民币大写
unison使用
supervisor 使用记录
如何修改 Ubuntu 时区
ubuntu 中 history 命令显示执行时间
Ubuntu 修改 SSH 登录欢迎界面
git仅拉取仓库内的指定目录
本文档使用 MrDoc 发布
-
+
home page
Python3.8 安装
# 依赖安装 ``` apt install build-essential -y apt install curl g++ gcc git libffi-dev libfreetype6-dev libfribidi-dev libgdbm-dev \ libharfbuzz-dev libjpeg8-dev liblcms2-dev libldap2-dev libncurses5-dev \ libnss3-dev libopenjp2-7-dev libperl-dev libreadline-dev libsasl2-dev \ libsqlite3-dev libssl-dev libtiff5-dev libwebp-dev libxcb1-dev libxml2-dev \ libxslt1-dev net-tools python3-dev python3-setuptools python3-tk tcl8.6-dev \ tk8.6-dev vim zlib1g-dev -y ``` ### 依赖说明 ``` # 安装 lxml 报错 sudo apt-get install libxml2-dev libxslt1-dev # 安装 pyldap 报错 sudo apt-get install python3-dev libldap2-dev libsasl2-dev libssl-dev # 安装 psycopy2 报错 pip install psycopg2-binary # 安装 pillow 报错 sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \ libharfbuzz-dev libfribidi-dev libxcb1-dev ``` # 源码安装 [下载最新版本](https://www.python.org/downloads/) 将源码解压到 `/usr/local/src/` ``` ./configure --enable-optimizations --prefix=/usr/local/python3.8 make make install ln -s /usr/local/python3.8/bin/python3.8 /usr/bin/python3.8 ln -s /usr/local/python3.8/bin/pip3.8 /usr/bin/pip3.8 ``` # pip 安装与配置 [pip 安装](https://pip.pypa.io/en/stable/installation/) ``` wget https://bootstrap.pypa.io/get-pip.py python3.8 get-pip.py ``` 修改 pip 源 ``` pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # 数梦内网配置 pip config set global.index-url http://pypa.k8s.dtdream.vip/pypi pip config set global.trusted-host pypa.k8s.dtdream.vip poetry source add --priority=default mirrors https://pypi.tuna.tsinghua.edu.cn/simple/ poetry source add --priority=default mirrors http://pypa.k8s.dtdream.vip/pypi ``` # 其他 https://pillow.readthedocs.io/en/latest/installation.html ## 卸载所有Python包 ```bash pip freeze > python_modules.txt pip uninstall -r python_modules.txt -y ```
幻翼
Dec. 13, 2023, 10:21 a.m.
转发文档
Collection documents
Last
Next
手机扫码
Copy link
手机扫一扫转发分享
Copy link
Markdown文件
share
link
type
password
Update password