Skip to content

Instantly share code, notes, and snippets.

@samlexrod
Last active March 12, 2018 22:28
Show Gist options
  • Save samlexrod/b3b5c70d9cff5c4228f0dc1dcfa9f54c to your computer and use it in GitHub Desktop.
Save samlexrod/b3b5c70d9cff5c4228f0dc1dcfa9f54c to your computer and use it in GitHub Desktop.
Here I show how I set up my working environment, one, to show how I do it, and two, to remember how I do it just in case. :-)

Setting my Work Environment

  1. Install Anaconda Distribution
  2. Installing Spyder
conda install spyder

1. Enable interactive 3d plots in Spyder by going to Tools > Preferences > IPython Console > Graphics. 
From this page, set Backend to Automatic.
2. When you run scripts, if they load up other files (such as datasets or other scripts), 
Spyder may need to have it's current working directory set to the location where your script is running from. 
Without this, you'll have to use absolute paths rather of relative ones to locate anything! You can change 
Spyder's CWD by clicking on Configure from the Run menu. Or alternatively, you can do it in your source code 
directly by adding: os.chdir('/Full/Dir/Path/Here'). Alternatively, you can do it directly in the interactive 
IPython console during runtime using %cd /Full/Dir/Path/Here. If you ever run into a 'file-not-found' error, 
your current working directory is probably out of sync.
  1. Install Jupyter Notebook Extensions
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment