Time to start setting up your development environment! The IDE you’ll see used in this course is PyCharm. This IDE has some advantages because it will perform some tasks for you automatically. For example, it creates a virtual environment when you start a new project. In this course, you’ll still see how to set one up by hand.
First head over to your terminal and make a new folder called django-portfolio by using the mkdir command. Then, move into the folder called django-portfolio and create a virtual environment with venv. You’ll use the command python 3 -m venv .env, where .env is the name of your virtual environment.
Before you can install any packages in there, you still need to activate the virtual environment. Run the command source .env/bin/activate. Your prompt will change, and you’ll be inside a virtual environment, so any changes you make will be limited to this environment. Then you can install django with pip.
andrewcraigrn on June 9, 2022
Hello!
I’m getting this error: “Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases” when I attempt to start the virtual environment. However, I have Python 3 installed on my computer. Any ideas?