Skip to main content

Posts

Showing posts from July, 2020

Installing pip with get-pip.py in a Python virtual environment on Windows MacOS & Linux

To create a Python virtual environment type below commands on the required console prompt: On Windows     python -m venv ./venv     .\venv\Scripts\activate On Ubuntu     python3 -m venv ./venv      source ./venv/bin/activate There are some exceptional cases where vent creation might fail. Here are some workarounds - https://askubuntu.com/questions/1268833/error-command-path-to-env-bin-python3-7-im-ensurepip-upgrade Exiting a Python Virtual Environment 1 2 3 To exit a Python virtual environment, you can use the  deactivate  command. This command is available in most Unix-like systems and Windows. Example $ deactivate Steps to Exit Virtual Environment 1. Using deactivate Command The most common way to exit a virtual environment is by using the  deactivate  command 1 . Example: $ deactivate 2. Using source deactivate In some cases, especially with certain virtual environment management tools like  virt...