Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beci/53a08cb73ec8539b895a64bebbd49734 to your computer and use it in GitHub Desktop.
Save beci/53a08cb73ec8539b895a64bebbd49734 to your computer and use it in GitHub Desktop.
Machine learning packages a step behind python releases. Python is upgraded to 3.8 in arch linux based distros recently, but pytorch and tensorflow support up to 3.7 yet

downgrade python for pytorch and tensorflow

1. install the required version of python

On arch linux python37 from AUR, using yay:

yay -S python37
2. create the virtual environment with the installed version of python
python3.7 -m venv venv
3. Activate the venv
#Fish shell:
source venv/bin/activate.fish

#Bash and friends:
source venv/bin/activate
4. install the required packages on the activated venv
pip3 install torch torchvision
pip install tensorflow-gpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment