腾讯云安装python36
安装对应的 Release
yum -y install epel-release Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:7-12 will be installed --> Finished Dependency Resolution #得到ius-release.rpm [root@localhost ~]# wget https://centos7.iuscommunity.org/ius-release.rpm [root@VM_0_14_centos ~]# rpm -ivh ius-release.rpm warning: ius-release.rpm: Header V4 RSA/SHA256 Signature, key ID 4b274df2: NOKEY Preparing... ################################# [100%] Updating / installing... 1:ius-release-2-1.el7.ius ################################# [100%]
安装依赖文件
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel mysql-commuity-devel gcc gcc-devel python-devel
安装python36
#安装python36 [root@VM_0_14_centos ~]# yum install -y python36u Loaded plugins: fastestmirror, langpacks Repository epel is listed more than once in the configuration Loading mirror speeds from cached hostfile Package python36u is obsoleted by python3, trying to install python3-3.6.8-10.el7.x86_64 instead
安装pip
[root@VM_0_14_centos ~]# yum install -y python36u-pip python36u-devel Loaded plugins: fastestmirror, langpacks Repository epel is listed more than once in the configuration Loading mirror speeds from cached hostfile Package python36u-pip is obsoleted by python3-pip, trying to install python3-pip-9.0.3-7.el7_7.noarch instead
修改pip源
[root@VM_0_14_centos ~]# mkdir ~/.config/pip/ vim ~/.config/pip/pip.conf [global] index-url = http://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com 保存退出
更新完成后,在 Home 目录下创建一个 django 的测试项目,用于我们后续的测试。
正式项目部署时也参考这里的步骤
cd /home/ mkdir django cd django python3.6 -m venv venv
安装django
. venv/bin/activate pip install django==2.1.8
分类:
Python学习
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 智能桌面机器人:用.NET IoT库控制舵机并多方法播放表情
· Linux glibc自带哈希表的用例及性能测试
· 深入理解 Mybatis 分库分表执行原理
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 手把手教你在本地部署DeepSeek R1,搭建web-ui ,建议收藏!
· 新年开篇:在本地部署DeepSeek大模型实现联网增强的AI应用
· Janus Pro:DeepSeek 开源革新,多模态 AI 的未来
· 互联网不景气了那就玩玩嵌入式吧,用纯.NET开发并制作一个智能桌面机器人(三):用.NET IoT库
· 【非技术】说说2024年我都干了些啥