Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Activating a Virtual Environment in the Terminal

Give Feedback

In this lesson, you’ll learn how to activate a virtual environment using the activate script. The lesson also covers one way to check which third party libraries are installed in the virtual environment.

hirejorge on March 6, 2020

which pip3 command does not work inside of windows vscode. what would be the equivalent in windows?

Dan Bader RP Team on March 7, 2020

On Windows, you can use the where.exe command. This should work:

C:\> where pip

Martie on May 15, 2020

As I’m watching this course I’m struggling with a real venv issue.

I’m trying to set up a python 3.7.3 virtual environment on a web host. I’ve got a subdomain portfolio.pym-ltd.com which I have all my scripts in and I need it to have Python 3.7.3 running.

In the terminal I can do this:

[pymlrfvr@server254 portfolio.pym-ltd.com]$
[pymlrfvr@server254 portfolio.pym-ltd.com]$ python -V
Python 2.6.6
[pymlrfvr@server254 portfolio.pym-ltd.com]$ source /home/pymlrfvr/virtualenv/portfolio.pym-ltd.com/3.7/bin/activate && cd /home/pymlrfvr/portfolio.pym-ltd.com
(portfolio.pym-ltd.com:3.7)[pymlrfvr@server254 portfolio.pym-ltd.com]$ python -V
Python 3.7.3
(portfolio.pym-ltd.com:3.7)[pymlrfvr@server254 portfolio.pym-ltd.com]$

which I thought means I’m running Python 3.7.3 in the subdomain space, BUT when I run a small python script to show the sys.version_info I get:

www.portfolio.pym-ltd.com/ignore%20index.php

This is Python! Honestly! (2, 6, 6, 'final', 0)

Have you any idea why the terminal shows Python 3.7.3, but the code running in the browser identifies 2.6.6.

I can only think I’ve missed something really simple.

Become a Member to join the conversation.