Closed Lovegood-1 closed 4 years ago
If you are on linux or Mac OS you can set it on the command line. If your data files are in /home/jdoe/data/
, then you would just do
export SPECTRAL_DATA=/home/jdoe/data
before starting python from the same terminal. You can also put the command shown above in your .bashrc (or equivalent) so it is run every time you login. On Windows, you likely would need to set it in your registry.
If you don't want to set it from the command line or in your login script, you could set it from your python script like this:
import os
os.environ['SPECTRAL_DATA'] = '/home/jdoe/data`
this doesn't help
When I run this code in python
out: Unable to locate file "92AV3C.lan". If the file exists, use its full path or place its directory in the SPECTRAL_DATA environment variable.
So I want to ask how to place a new directory in the SPECTRAL_DATA environment variable.