一.    准备

1.1 电脑登录termux

1.2 更换镜像,并准备vim

二. Python 极其环境配置

2.1 数据分析相关

2.2 Jupyter Notebook 使用

2.3 Python 爬虫

2.4 其他python包安装

1.1 用电脑 terminal 登录termux

pkg install openssh# 安装ssh

passwd # 设置登录密码

ifconfig # 获取ip (手机电脑链接同一路由器/局域网)

whoami # 获取用户名

sshd # 开启 ssh 服务7fd84c7ceb442d0f2235c273772d3771a09c0ba0.png

terminal 登录:

ssh u0_a254@192.168.3.2 -p 8022# 登录termux , 输入密码

1.2 更换镜像源

sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux stable main@' $PREFIX/etc/apt/sources.list# 注释掉原本该源,并添加清华镜像

apt update && apt upgrade # 更新并升级 (有些需要y确认)

2 安装杂七八

apt install vim# 安装 vim

有关基础操作:https://www.freebuf.com/geek/170510.html4aa545dccf7de8d4a93c2b2b8e3265ac0a26d216.png

2 Python 极其环境配置

pkg install python # 安装Python3862c8174076fb4b08c535daedfa7ec5d496c17d8.pngpython 安装完成

2.1 数据分析相关

apt install clang fftw

apt install freetype libpng pkg-config libzmq

pkg install numpy scipy # pip 安装很大可能安装不上

Qin=https://pypi.tuna.tsinghua.edu.cn/simple# pip 的清华镜像地址

pip install -i $Qin --upgrade pip

pip install -i $Qin pandas matplotlib jupyter# 安装 pandas, 画图,和chrome 端交互软件jupyter notebook。(这个可能很慢, 视手机情况而定了 ┐(´ー`)┌ )

1fedf7b43fbbe81ed4a5458f4bdd08229419e9e2.png安装 pandas matplotlib jupyter 之后

这里 就可以用 pandas 处理数据, jupyter notebook 画图了 ᕙ(@°▽°@)ᕗ

————————————————

参考来源:https://blog.csdn.net/qq_36791314/article/details/80628771

作者:Takio_

2.2 Jupyter Notebook 使用

jupyter notebook # 复制最后面的网址,然后黏贴入chrome,就可以用了 (。•̀ᴗ-)✧4a7bca9146a101b320159794b3620d08ea73b41d.gifjupyter notebook 使用及出图演示

画图测试代码:

import numpy as np

import matplotlib as mpl

import matplotlib.pyplot as plt

np.random.seed(1000)

y = np.random.standard_normal(20)

x = range(len(y))

plt.plot(x, y)

plt.show()

2.3. 还有爬虫套装

pip install -i $Qin BeautifulSoup4 requests

安装 lxml

apt-get install libxml2 libxslt

pip install -i $Qin lxml

2.4. 其他python包安装

官网论坛链接,大家可以试试~反正我是都失败了 /sad

https://wiki.termux.com/wiki/Instructions_for_installing_python_packages

4aa545dccf7de8d4a93c2b2b8e3265ac0a26d216.png

3 R语言

#建立storage

termux-setup-storage (手机需要授予权限)

vim$PREFIX/etc/apt/sources.list

#添加镜像

#进入之后输入 i 进入编辑模式。

deb https://its-pointless.github.io/files/ termux extras

#输入完之后 同时按住音量+和e键,输入:wq 即可保存并退出编辑模式。

apt-get update#环境更新

pkg install r-base#安装R (下载有点慢,不过耐心点~很快的 (◍•ᴗ•◍) )

————————————————

参考出处:https://blog.csdn.net/wzgl__wh/article/details/80078586

作者:王亨

后续:安装ggplot2

apt-get install make libtiff libcairo librsvg# 有些包的编译需要

install.packages('ggplot2')# 安装吧~

如果有错误,先:

install.packages('Rcpp')

install.packages('ggplot2')

ffd5752cf7fc9f03938eea26617377e09cb411a2.gifggplot2 测试

(此处演示,是通过分屏,在上方显示之前的图片,然后通过同名覆盖,(☆▽☆) 点击刷新实现的~)

测试代码

library(ggplot2)

setwd("storage/pictures/R/")

mtcars[,2]= as.character(mtcars[,2])

ggplot(mtcars) + geom_point(aes(x=mtcars[,1],y=mtcars[,3],color=mtcars[,2])) + theme_light()

ggsave('test.png')

另:据说安装IRkernel 后,可以在 Jupyter Notebook 中打开R的。 但是由于各种原因,并不是那么简单的。电脑很容易成功,但是 termux 有点麻烦。反正代码我是放这里了- -  我没有成功  (╯ರ ~ ರ)╯︵ ┻━┻

devtools::install_github('IRkernel/IRkernel')

IRkernel::installspec()# 只在当前用户下安装

IRkernel::installspec(user = FALSE)# 在系统下安装

一些好玩但是没用的东西~

apt install htop cmatrix tmux cowsay nyancat# 装 cowsay 会顺便把 perl装上

dfc6fbbe203311f65fb24bf79702ba0309cd51b3.pngtmux 分屏

842c28f9959f14ba311d763bf72c80f7fdaf5888.gifnyancat

其他神奇功能和基础介绍:

https://www.freebuf.com/geek/170510.html

npm install mapscii -g

mapscii# 加載需要小鑰匙(小飛機)233. 效果一般,主要图个新鲜哈哈哈 ┻━┻︵└(՞▽՞ └)

5dfcb7220da157ddf44ec0b7cdf779553885b386.pngmapscii 的显示效果~

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐