美文网首页Django
1.Python虚拟环境创建

1.Python虚拟环境创建

作者: Stone_説 | 来源:发表于2022-03-29 00:49 被阅读0次

    1.虚拟环境的创建

    安装virtualenv工具
    stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 install virtualenv
    stone@stone-ubuntu:~/Desktop/py_virtual_env$ pwd
    /home/stone/Desktop/py_virtual_env
    stone@stone-ubuntu:~/Desktop/py_virtual_env$ virtualenv s25 --python=python2.7
    stone@stone-ubuntu:~/Desktop/py_virtual_env$  virtualenv s28
    stone@stone-ubuntu:~/Desktop/py_virtual_env$ source s28/bin/activate
    (s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ deactivate
    stone@stone-ubuntu:~/Desktop/py_virtual_env$ 
    

    2.安装Django

    (s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 install django==1.11.7 -i https://pypi.tuna.tsinghua.edu.cn/simple
    (s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 list
    Package    Version
    ---------- -------
    Django     1.11.7
    pip        21.1.1
    pytz       2022.1
    setuptools 56.1.0
    wheel      0.36.2
    

    相关文章

      网友评论

        本文标题:1.Python虚拟环境创建

        本文链接:https://www.haomeiwen.com/subject/sjxijrtx.html