Hits: 166

http://iooi.fun/archives/124.html

安装应用商店里面的python3之后,没有任何作用。
通过shell链接到NAS上找到安装包的位置

1
2
3
[~] # cat /share/CACHEDEV1_DATA/.qpkg/Python3/README.md
Run the following command to enter Python3 environment:
$ . /etc/profile.d/python3.bash

那么这个还没有运行权限

1
2
ls -als /etc/profile.d/python3.bash
0 lrwxrwxrwx 1 admin administrators 48 2019-07-12 12:57 /etc/profile.d/python3.bash -> /share/CACHEDEV1_DATA/.qpkg/Python3/python3.bash*

我们改一下:

1
2
[~] # chmod 744 /share/CACHEDEV1_DATA/.qpkg/Python3/python3.bash
[~] # . /etc/profile.d/python3.bash

现在可以用python3;

1
2
3
4
[~] # python<tab>
python python2.7 python3.5 python3.5m python3-config python2 python3 python3.5-config python3.5m-config
[~] # python3 -V
Python 3.5.2

不能开机就运行这个脚本。每次重新开机都要去再运行一次,或用startup定义脚本让它自动启动;