Python Setup - JackieWSC/Onepiece GitHub Wiki

Python Setup

Library

  • Anaconda

    • Install Anaconda
    • Anaconda is a distribution of the Python language for scientific computing
    • Simplify package management and deployment
    • Package versions are managed by package management system conda
  • pyCharm

    • IDE for python language
  • Python

    • Check the python version after installed the Anaconda
>python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
  • Conda
    • Used to manage the package versions
    • Check the installed package
>conda list
# packages in environment at /anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0            py36h2fc01ae_0  
alabaster                 0.7.10           py36h174008c_0 
  • Check the version
>conda -V
conda 4.5.4
  • Create the virtual environment
$ conda create -n envName
e.g.
$ conda create -n my_it30days jupyter
  • Activate and Deactivate the environment
# To activate this environment, use
#
#     $ conda activate my_it30days
#
# To deactivate an active environment, use
#
#     $ conda deactivate
  • List all the virtual environment
conda env list

# conda environments:
#
base                  *  /opt/anaconda3
my_it30days              /opt/anaconda3/envs/my_it30days

Reference