zoukankan      html  css  js  c++  java
  • python 虚拟环境

    python3 目录venv创建为虚拟环境,并激活。

    $ python3 -m venv ./venv
    $ source venv/bin/activate
    -m:   -m mod : run library module as a script (terminates option list)
    $ python3 -m venv --help
    usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
                [--upgrade] [--without-pip]
                ENV_DIR [ENV_DIR ...]
    
    Creates virtual Python environments in one or more target directories.
    
    positional arguments:
      ENV_DIR               A directory to create the environment in.
    
    optional arguments:
      -h, --help            show this help message and exit
      --system-site-packages
                            Give the virtual environment access to the system
                            site-packages dir.
      --symlinks            Try to use symlinks rather than copies, when symlinks
                            are not the default for the platform.
      --copies              Try to use copies rather than symlinks, even when
                            symlinks are the default for the platform.
      --clear               Delete the contents of the environment directory if it
                            already exists, before environment creation.
      --upgrade             Upgrade the environment directory to use this version
                            of Python, assuming Python has been upgraded in-place.
      --without-pip         Skips installing or upgrading pip in the virtual
                            environment (pip is bootstrapped by default)
    
    Once an environment has been created, you may wish to activate it, e.g. by
    sourcing an activate script in its bin directory.

    python2 创建虚拟目录

    安装pip  , virtualenv 

    wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
    sudo python get-pip.py
    sudo pip install virtualenv
    virtualenv venv
    source venv/bin/activate

     pip使用

    https://docs.python.org/3/installing/

  • 相关阅读:
    试试 cocos creator 3.0 还算可以
    安卓按键辅助(类似按键精灵)
    一次github遭遇
    NSString
    Navicat for SQL Server V10.0.10
    申请博客第一天
    Google Earth的脫機應用-本地模擬瓦片系統
    Vs2010+opencv2.3.1 imread出现异常
    tcpdump工具注意事项
    选择服务器托管机房的注意事项
  • 原文地址:https://www.cnblogs.com/w-jinfeng/p/6047500.html
Copyright © 2011-2022 走看看