This post is just a quick reflection after finishing part 1 of Miguel Grinberg’s Flask Mega Tutorial.
If you are using Python 3.4, to install a virtual environment for Flask, you only need to run $ python -m venv flask
.
You don’t need to run$ virtualenv flask
. Using virtualenv is… tricky. I’m still not quite sure how it works. I think the author doesn’t go into enough detail for a beginner who has never used virtualenv before. However, I have a general sense of how it works. It seems that if you navigate to the /Scripts sub-directory of your project, you can activate the virtual environment by running $ activate
. You can confirm that the packages/extensions you wanted are installed correctly by typing $ pip freeze
or $ pip list
while virtualenv is activated. If you try these commands outside of your environment, you will see what is installed into Python’s core. I did get the server to work and disply “Hello World!” so its a start I guess. I just hope the rest of the tutorial isn’t so convoluted as the initial installation part. It doesn’t help that I’m also learning how to navigate PyCharm at the same time.
In other news, I’m waiting for my transcripts to arrive at OSU before they can give me a verdict on my application.