Skip to content

Instantly share code, notes, and snippets.

@mrshu
Created August 7, 2019 14:49
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 mrshu/0c02892699c08e5b22c396de040c2144 to your computer and use it in GitHub Desktop.
Save mrshu/0c02892699c08e5b22c396de040c2144 to your computer and use it in GitHub Desktop.
Install Pytorch on AWS Glue
import os
import site
from setuptools.command import easy_install
install_path = os.environ['GLUE_INSTALLATION']
easy_install.main( ["--install-dir", install_path, "torch"] )
reload(site)
import torch
print(torch.__version__)
import os
import site
# reload() has been moved to importlib in Python 3.4
# https://docs.python.org/3/whatsnew/3.4.html#importlib
from importlib import reload
from setuptools.command import easy_install
install_path = os.environ['GLUE_INSTALLATION']
easy_install.main( ["--install-dir", install_path, "torch"] )
reload(site)
import torch
print(torch.__version__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment