tremux tensorflow
第一步、依次执行以下命令,含义不解释了[忘记哪里复制的我的机器执行没有问题]。注意循序
pip install BeautifulSoup4 requests
pkg install install clang python python-dev fftw libzmq libzmq-dev freetype freetype-dev libpng libpng-dev pkg-config
pkg install install libxml2 libxml2-dev libxslt libxslt-dev
pip install lxml
pkg install openssl openssl-tool openssl-dev libffi libffi-dev
pip install scrapy
验证,输入: python
import scrapy
没有错误提示,说明安装scrapy成功!
记得验证完输入 quit()退出,继续安装其它模块。
LDFLAGS=" -lm -lcompiler_rt" pip install numpy matplotlib pandas jupyter
pip install nltk ipython
pip install demjson tushare colorama
pkg install git 这个码农都懂的
pkg install htop 任务管理器
pkg install tree 目录树
pkg install vim
虽然termux自带vi,如果想使用vim(毕竟神之编辑器),则必须安装,配合.vimrc,bundle 和 git 可以完美配置python开发环境,体验几乎和ubuntu的终端无异.
第二步、安装tensorflow
- 查看cpu版本:
cat /proc/cpuinfo
例如:Processor : AArch64 Processor rev 4 (aarch64)
示例说明:arm芯片 64位
- 查看python版本:
python
import pip._internal;
print(pip._internal.pep425tags.get_supported()
例如:[(‘cp37’, ‘cp37m’, ‘linux_aarch64’), (‘cp37’, ‘abi3’, ‘linux_aarch64’), (‘cp37’, ‘none’, ‘linux_aarch64’), (‘cp36’, ‘abi3’, ‘linux_aarch64’), (‘cp35’, ‘abi3’, ‘linux_aarch64’), (‘cp34’, ‘abi3’, ‘linux_aarch64’), (‘cp33’, ‘abi3’, ‘linux_aarch64’), (‘cp32’, ‘abi3’, ‘linux_aarch64’), (‘py3’, ‘none’, ‘linux_aarch64’), (‘cp37’, ‘none’, ‘any’), (‘cp3’, ‘none’, ‘any’), (‘py37’, ‘none’, ‘any’), (‘py3’, ‘none’, ‘any’), (‘py36’, ‘none’, ‘any’), (‘py35’, ‘none’, ‘any’), (‘py34’, ‘none’, ‘any’), (‘py33’, ‘none’, ‘any’), (‘py32’, ‘none’, ‘any’), (‘py31’, ‘none’, ‘any’), (‘py30’, ‘none’, ‘any’)]
示例说明:cp37 == python3.7
- 下载tensorflow包参考文章2
项目地址:https://github.com/lhelontra/tensorflow-on-arm/releases
#最接近的版本 cp35
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.13.1/tensorflow-1.13.1-cp35-none-linux_aarch64.whl
下载完成后,修改文件名,改成与机器相同的版本名称
cd tensorflow
cp tensorflow-1.13.1-cp35-none-linux_aarch64.whltensorflow-1.13.1-cp37-none-linux_aarch64.whll
开始安装
python -m pip install tensorflow-1.13.1-cp37-none-linux_aarch64.whl
如果有报错 :下面的错误说明安装的版本不对,我是通过修改文件名称解决的。
tensorflow-1.13.1-cp35-none-linux_aarch64.whl is not a supported wheel on this platform.
尝试更新pip为最新版
python -m pip install --upgrade pip