User Tools

Site Tools


ace-cream:virtualenv

This is an old revision of the document!


如何使用Python 3.6

ace-cream上装有python3.6,但原始python3 还是指向3.5版本。 需要使用3.6版本运行程序的同学请自建一个 virtualenv 环境,方法如下:

假设用户john,在自定义的路径下(如/data/john)建立一个叫myvenv 的虚拟环境的文件夹:

   python3.6 -m venv myvenv

进入myvenv中,输入:

   source bin/activate
   curl https://bootstrap.pypa.io/get-pip.py | python3

接下来用pip在这个环境中装需要的package ,如

   pip3 install numpy

最后就如往常一样使用 python3 就好

返回

ace-cream/virtualenv.1528111609.txt.gz · Last modified: 2018/06/04 07:26 by yang