虚拟机安装python3.6.6_python3.6安装,解决import sqlite错误
1.使用命令下載軟件包
安裝依賴
yum -y install sqlite-devel
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
[root@VM_58_11_centos ~]#wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz? 獲取安裝包
2.安裝
[root@VM_58_11_centos ~]#tar -zxf Python-3.6.1.tgz? 解壓縮
[root@VM_58_11_centos ~]#cd Python-3.6.1? 定位到文件夾#查看安裝包文件[root@VM_58_11_centos Python-3.6.1]#ls
aclocal.m4? ? config.sub? configure.ac? Grammar? install-sh? LICENSE? Makefile.pre.inModules? Parser? PCbuild? ? ? ? Python? setup.py
config.guess? configure? Doc? ? ? ? ? Include? Lib? ? ? ? Mac? ? ? Misc? ? ? ? ? ? Objects? PC? ? ? pyconfig.h.inREADME? Tools
[root@localhost Python-3.6.1]#./configure? 添加配置
[root@localhost Python-3.6.1]#make? ? ? 編譯源碼
[root@localhost Python-3.6.1]#make install? ? 執行安裝
執行完成后,進去看下版本就可以
[root@localhost utils]# python
Python 3.6.1 (default, Jun? 8 2017, 19:01:21)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import sqlite3
>>>
注意:pip命令如果沒法使用是因為python安裝后生成的是pip3,不是pip可以做個連接解決
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的虚拟机安装python3.6.6_python3.6安装,解决import sqlite错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python安装包之后仍提示_解决已经安
- 下一篇: java 右键菜单_界面操作--添加右键