多版本python管理miniconda(集成了virtualenv和pip功能)


miniconda下載地址: https://conda.io/docs/user-guide/install/index.html 

Installing on Linux

  1. Download the installer:

  2. In your Terminal window, run:

    • Miniconda:

      bash Miniconda3-latest-Linux-x86_64.sh
  3. Follow the prompts on the installer screens.

    If you are unsure about any setting, accept the defaults. You can change them later.

  4. To make the changes take effect, close and then re-open your Terminal window.

  5. conda create -n virtual_env_name  創建虛擬環境
  6. conda remove --name virtual_env_name --all  移除虛擬環境
  7. source activate virtual_env_name
  8. source deactivate virtual_env_name
  9. conda install python=3.6  激活虛擬環境后安裝包 
  10. conda remove packetname 激活虛擬環境后移除包
  11. conda update packetname 激活虛擬環境后更新包
  12. 在指定的目錄下創建虛擬環境(創建后用conda env list是看不到的)
    conda create --prefix=/home/zxpo/test/webapp
    source activate /home/zxpo/test/webapp
    source deactivate /home/zxpo/test/webapp
    conda remove --prefix=/home/zxpo/test/webapp --all


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM