Saturday, March 31, 2018

python - Numba environment variable not set through .numba_config.yaml

Some environment variables can be set for numba, as specified in the doc: https://numba.pydata.org/numba-doc/dev/reference/envvars.html



However, launching a python shell in the same folder, I cannot see the variable in os.environ:




In [1]: !cat .numba_config.yaml                                                                      
warnings: 1

In [2]: import os; os.environ["NUMBA_WARNINGS"]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
in
----> 1 import os; os.environ["NUMBA_WARNINGS"]


~/anaconda3/lib/python3.6/os.py in __getitem__(self, key)
667 except KeyError:
668 # raise KeyError with the original key value
--> 669 raise KeyError(key) from None
670 return self.decodevalue(value)
671

KeyError: 'NUMBA_WARNINGS'



(I have pyyaml installed, import yaml does not yield an error)

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...