1. Python3.6 install
1.1. apt-get
$ sudo add-apt-repository ppa:jonathonf/python-3.6
$ sudo apt-get update
$ sudo apt-get install python3.6
$ sudo ln -s /usr/local/bin/python3.6 /usr/bin/python
1.2. source code install
$ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
$ mkdir -p /usr/local/python3
$ tar -zxvf Python-3.6.1.tgz
$ cd Python-3.6.1
$ ./configure --prefix=/usr/local/python3
$ make
$ sudo make isntall
$ ln -s /usr/local/python3/bin/python3 /usr/bin/python3
2. sqlite3 install for python3.6
Step 1
$ sudo apt-get install libsqlite-dev
Step 2
$ wget https://www.sqlite.org/2017/sqlite-autoconf-3170000.tar.gz --no-check-certificate
$ tar zxvf sqlite-autoconf-3170000.tar.gz
$ cd sqlite-autoconf-3170000
$ ./configure --prefix=/usr/local/sqlite3 --disable-static --enable-fts5 --enable-json1 CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_RTREE=1"
Step 3
$ cd Python-3.6.2
$ LD_RUN_PATH=/usr/local/sqlite3/lib ./configure --prefix=/usr/local/python3 LDFLAGS="-L/usr/local/sqlite3/lib" CPPFLAGS="-I /usr/local/sqlite3/include"
$ LD_RUN_PATH=/usr/local/sqlite3/lib make
$ LD_RUN_PATH=/usr/local/sqlite3/lib sudo make install
3. Docs
-
Linux安装python3.6
https://www.cnblogs.com/kimyeee/p/7250560.html -
Python3.6安装sqlite3的终极解决办法
https://blog.csdn.net/sparkexpert/article/details/79118448 -
ubuntu环境下 python 3.0以上版本对sqlite3的支持问题
https://blog.csdn.net/sparkexpert/article/details/69944835
网友评论