- To create a Python virtual environment type below commands on the required console prompt:

- To install pip, securely download
get-pip.py
by following this link: get-pip.py. Alternatively, use curl
:
get-pip.py
by following this link: get-pip.py. Alternatively, use curl
:Then run the following command in the folder where you have downloaded get-pip.py
:
Warning
Be cautious if you are using a Python install that is managed by your operating system or another p
ackage manager.get-pip.py
does not coordinate with those tools, and may leave your system in an inconsistent state. Hence it is recommended to use venv (Python Virtual Environment) to isolate the working environment with the Python environment at the system level.To install python3 & virtualenv on MacOS
Python3 Virtualenv Setup
Requirements:
- Python3
- Pip3
$ brew install python3 #upgrade
Pip3 is installed with Python3
Installation
To install virtualenv via pip run:
$ pip3 install virtualenv
Usage
Creation of virtualenv:
$ virtualenv -p python3 <desired-path>
Activate the virtualenv:
$ source <desired-path>/bin/activate
Deactivate the virtualenv:
$ deactivate
You can see more about the Homebrew
on the official page.
Comments
Post a Comment