天天看點

termux 安裝python_termux軟體安裝.txt

#最後,把以上整理成一個.sh檔案,在指令行運作bash termux_python.sh一鍵安裝

#執行termux-setup-storage(注意:這個指令隻能在手機上執行才能彈出授權對話框

#Termux安裝python所需要的一些庫

#第一步1.termux_python.sh複制到/data/data/com.termux/files/home才能運作

#/data/data/com.termux/files/home/storage/shared/azhihu

#第二步2.Permission denied 更改權限chmod 764 termux_python.sh

apt update

apt upgrade

apt install -y python python-dev python2 python2-dev

apt-get install -y clang

apt-get install -y libxml2 libxml2-dev libxslt libxslt-dev

apt install -y openssl libffi libffi-dev libcrypt-dev

apt install -y openssl openssl-tool openssl-dev

apt install -y clang g++  libxml2-dev libxslt-dev python python-dev

apt install -y clang python python-dev

apt install -y fftw libzmq libzmq-dev

apt install -y freetype freetype-dev libpng libpng-dev pkg-config

pip install --upgrade pip

pip install BeautifulSoup4 requests

pip install lxml

pip install scrapy

#安裝jupyter

#安裝依賴包

apt install clang python python-dev fftw

LDFLAGS="-lm -lcompiler_rt" pip install numpy

LDFLAGS="-lm -lcompiler_rt" pip install pandas

apt install libpng libpng-dev freetype freetype-dev

LDFLAGS="-lm -lcompiler_rt" pip install matplotlib

apt install libzmq libzmq-dev

LDFLAGS="-lm -lcompiler_rt" pip install jupyter

#運作Jupyter

jupyter notebook

#安裝好libzmq

#和libzmq-dev

#包之後重新安裝一遍jupyter

#pip install --force-reinstall jupyter就可以了。

安裝jupyterlab

pip install jupyterlab

jupyter serverextension enable --py jupyterlab --sys-prefix

jupyter lab

# 設定 jupyter notebook 可遠端訪

jupyter notebook --generate-config

ipython

In [1]: from notebook.auth import passwd

In [2]: passwd()

Enter password:

Verify password:

Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

在 jupyter_notebook_config.py 中找到下面的行,取消注釋并修改。

c.NotebookApp.ip='0.0.0.0'

c.NotebookApp.password = u'sha:ce...剛才複制的那個密文'

c.NotebookApp.open_browser = False

c.NotebookApp.port =8889 #可自行指定一個端口, 通路時使用該端口

補全代碼

安裝nbextensions

apt-get install -y libxml2 libxml2-dev libxslt libxslt-dev

pip install --user jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple

jupyter contrib nbextension install --user

安裝nbextensions_configurator

pip install --user jupyter_nbextensions_configurator

jupyter nbextensions_configurator enable --user

安裝完成後,啟動Jupyter,可以看見标簽頁多了一個Nbextensions标簽

一鍵複制

編輯

Web IDE

原始資料

按行檢視

曆史