title: How to assign the SSD for file operations in Python?
body: <p>I am currently working with Spyder IDE on a Convolutional Neural Network training project. (Python 3.6 , keras-tensorflow). </p>
  
  <p>My data set is pretty large in means of size and the problem is even though my computer has enough space to store the dataset, it runs out of storage when i run the script. </p>
  
  <p>I have tried to relocate the dataset to my external SSD but my computer still runs out of storage. Then I have tried to create a python virtual environment inside my SSD to run the script from that environment but it was still using my computer's internal drive to store runtime variables.</p>
  
  <p>I need to know if there is a way to tell Python to use my external SSD to store runtime variables instead of my internal drive. </p>
  
  <p><strong>Code:</strong> <a href="https://codeshare.io/5OPmWv" rel="nofollow noreferrer">link on codeshare.io</a></p>
  
  <pre><code>x_train, x_test = [], []
  counter = 0
  for image_id in y_train.index.values:
      counter = counter + 1;
      image = imageio.imread('/Volumes/Untitled/skin-cancer-mnist-ham10000/Images/{}.jpg'.format(image_id))
      #image = misc.imresize(image, size=TARGET_SIZE, interp='nearest')
      image = normalize(image)
      x_train.append(image)
      if counter%50 == 0:    
          print('Completed processing {} images'.format(counter))
  </code></pre>
  
  <p>Thank you.</p>