Saturday, 31 March 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...