talkpython / async-techniques-python-course

Async Techniques and Examples in Python Course
https://training.talkpython.fm/courses/explore_async_python/async-in-python-with-threading-and-multiprocessing
MIT License
455 stars 250 forks source link

Code for setting up venv #1

Closed brendonmackenzie closed 6 years ago

brendonmackenzie commented 6 years ago

There is a use of an alias in chapter 04-asyncio to set up a virtual environment but it is not very clear what command is exactly used. Could we have this included somewhere in the code or course materials. I am assuming it is something along the lines of: alias venv='python3 -m venv venv && . venv/bin/activate && pip install --upgrade pip > /dev/null && pip install --upgrade setuptools > /dev/null'

This seemed to produce a similar product shown in the video.

mikeckennedy commented 6 years ago

Thanks Brendon. Yesh, that is the alias. You can shorten it a tad with

`alias venv='python3 -m venv venv && . venv/bin/activate && pip install --upgrade pip setuptools > /dev/null'

But it's an alias so it's all good. I didn't put it in the course materials because then we have it somewhat incompatible with windows folks and it's not needed for anything in the course. People can just type python[3] -m venv venv and it will work fine (just annoying warnings).