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/

  • 相关阅读:
    【math】共线性的影响分析
    【colab】挂载google网盘
    【ML】非均衡样本处理
    phpwind < v6 版本命令执行漏洞
    Uc爆破工具
    shodan:黑客搜索引擎
    webshell下执行命令脚本汇集
    Android利用Fiddler进行网络数据抓包
    150个在线代理站点
    PHP filesystem attack vectors
  • 原文地址:https://www.cnblogs.com/w-jinfeng/p/6047500.html
Copyright © 2011-2022 走看看