首页 > 编程语言 > 详细

python, environment, conda, pip

时间:2020-01-02 10:09:32      阅读:116      评论:0      收藏:0      [点我收藏+]

1. What is Pip(Pip installs Packages):

    pip is a standard package manager for Python. It is a tool and allows us to install and manage additional packages that are not part o the Python standard library. 

2. How to install pip:

    $ sudo apt install python3-pip  #install pip3

    $ pip3 --version

  $ pip --version

    pip 18.1 from C:\Python37\lib\site-packages\pip (python 3.7)   

    pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)   

------------------------------------------------------------------

1. What is Conda

    Conda is an open source package management system and environment management system that runs on Windows, macOS, and Linux.

    Conda quickly installs, runs and updates packages and their dependencies.

    Conda easily creates, saves, loads, and switches between environments on your local computer.

    It was created for Python programs but it can package and distribute software for any language.

2. Install Conda and create virtual environment

    ( 1 ) Download the installer for Linux  from here: https://docs.conda.io/en/latest/miniconda.html and I downloaded Miniconda installer for Linux(my system is Ubuntu 14 )  

    ( 2 ) Go to the installer-file directory and run $bash Miniconda3-latest-xxxxxxx.sh 

  ( 3 ) Stop the virtual environment if that virtual environment is running  $conda deactivate  

  ( 4 ) Create a virtual environment naming "helloProject" and install python3.5,  $conda -n helloProject python=3.5   

    ( 5 )  Activate that virtual environment  $ conda activate helloProject

  ( 6 ) Install package under the virtual environment, ( "helloProject" is ahead of  ‘ $ ‘ ) which means a virtual environment has launched 

     (helloProject)$ conda install scikit-learn    #install scikit-learn package

  ( 7 ) Exit the virtual environment $ conda deactivate

    

python, environment, conda, pip

原文:https://www.cnblogs.com/sarah-zhang/p/12131338.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!