Python Evironment

A python environment allows to install libraries and dependencies of different versions in different environments.

It is a very clean way to segregate libraries of different versions and be able to use these based on project requirements.

I have already installed anaconda for Python and using windows os.

How to check already available conda environments ?

At Anaconda prompt , execute following command

conda env list

How to create a new environment ?

conda create -n test_env_3 python=3.6

test_env_3 is name of environment and we are specifying to use python 3.6

How to activate an environment ?

conda activate test_env_3

How to list all packages available in env?

conda list

Add Conda environment as Jupyter Kernel

# First activate env. if not already done at anaconda prompt
conda activate test_env_3

# Second,install ipykernel
conda install  ipykernel

# Third, for the env. create kernel
python -m ipykernel install --user --name test_env_3 --display-name "Python_testenv_3_6"

Launch jupyter notebook, you would see new kernel as Python_testenv_3_6

jupyter notebook

Also install another package to manage conda environments from jupyter more efficiently

conda install nb_conda


要查看或添加评论,请登录

Shekhar Pandey的更多文章

  • CloudSql

    CloudSql

    Google Cloud SQL Let's start with basic question as why would anyone should use a google cloud service for SQL when you…

  • GCP: Identity and Access Management

    GCP: Identity and Access Management

    Identity and Access Management (IAM) lets administrators authorize who can take action on specific resources. An IAM…

  • Concept of Regional, Zonal resources in GCP

    Concept of Regional, Zonal resources in GCP

    Regions: Regions are independent geographic areas that consist of zones. Zones: A zone is a deployment area for Google…

  • Cloud Computing - key characterstics

    Cloud Computing - key characterstics

    5 fundamental attributes of Cloud Computing: On-demand: Customers get computing resources on-demand and self-service…

  • GCP Storage

    GCP Storage

    Google Cloud Platform (GCP) offers various storage options. The main storage options are : Google Cloud Storage, Google…

  • Learn Numpy, Pandas

    Learn Numpy, Pandas

    Numpy: https://github.com/shekhar270779/Learn_Numpy Pandas Series and DataFrame: https://github.

    1 条评论
  • Principal Component Analysis - PCA

    Principal Component Analysis - PCA

    Dimensionality reduction for visualization: Often we deal with a high dimensionality dataset, and there arises a need…

  • Slice and Dice

    Slice and Dice

    In data analysis, the term generally implies a systematic method of reducing a complete set of data into smaller parts…

  • pip vs venv vs conda

    pip vs venv vs conda

    Often there is a confusion as which command to use for new package installation , environment set up in (core) python ,…

社区洞察

其他会员也浏览了