3建立 Python 虚拟环境
为了不扰乱原来的环境我们来使用 Python 虚拟环境
[root@h165 Python-3.6.1]# cd /opt/
[root@h165 opt]#
[root@h165 opt]# python3 -m venv py3
[root@h165 opt]# source /opt/py3/bin/activate
(py3) [root@h165 opt]#
(py3) [root@h165 opt]#
(py3) [root@h165 opt]#
看到上面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
[vagrant@h165 ~]$ cd /opt/
[vagrant@h165 opt]$ git clone git://github.com/kennethreitz/autoenv.git
fatal: could not create work tree dir 'autoenv'.: Permission denied
[vagrant@h165 opt]$ sudo git clone git://github.com/kennethreitz/autoenv.git
Cloning into 'autoenv'...
remote: Counting objects: 671, done.
remote: Total 671 (delta 0), reused 0 (delta 0), pack-reused 671
Receiving objects: 100% (671/671), 103.92 KiB | 0 bytes/s, done.
Resolving deltas: 100% (356/356), done.
[vagrant@h165 opt]$ echo 'source /opt/autoenv/activate.sh' >> ~/.bashrc
[vagrant@h165 opt]$ source ~/.bashrc
[vagrant@h165 opt]$
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。