python switching versions

Python Switching versions

Lets get the current setting (We are on 3.5), and I have already built a 3.6 Env, plus Installed a Virtual 3.6 Env - with a symbol of pe36.

Gen current

Simple pip command

pip freeze > t.t

But this has Versions in it !! And this can cause issues.. So let strip out the versions.


pip freeze  | cut -d '=' -f 1 > newr.txt

With the new requirements file

  • switch to the new env
  • pip install
(pe35) tim@Timothys-Mac-mini ~ $ pe36
(pe36) tim@Timothys-Mac-mini ~ $ pip install -r newr.txt 

Slight gotch YA - locally built apps. So you will need to remove them.


Create a directory where you download the requiremants too

pip download <bla>

Copy your Local sdist file to the repository and the use pip to install locally.