Search This Blog

100_Virtual Environment Setup

Virtual Environment Creation and selecting environments in (windows 10):
Virtual environment creation in Python:
Create directory for environ ments:
>mkdir virtual_envs
>cd virtual_envs
Step1: py -m pip install --user virtualenv
Step2: py -m virtualenv venv_for_bots
Step3: .\venv_for_bots\Scripts\activate

venv_for_bots -->is the environment created.




Virtual environment creation in Anaconda:

Step1: Goto Anaconda prompt
Step2: conda create --name myenv 
           conda create -n myenv python==3.7 (specifying python version)
Step3: activate myenv

note: List Environments in conda:
conda env list

For reference:
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Virtual Environment creation through Pycharm:

Fileà settingsàProject à Python interpreter à right top corner select gear icon àaddà
Select Conda Environment/Virtual Environmnt/ à select new environment àgive the name àok



Open virtual environment in Pycharm:

Fileà settingsàProject à Python interpreter à right top corner select gear icon àaddà

Select Conda Environment/Virtual Environmnt/ à select existing environment àok


             

No comments:

Post a Comment