Missing YAML?
ryancoe opened this issue · 3 comments
ryancoe commented
Bug Description
Looks like pyyaml
should be included in setup.py
?
In [1]: from rex import WaveX
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 from rex import WaveX
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/__init__.py:8, in <module>
5 from __future__ import print_function, division, absolute_import
6 import os
----> 8 from rex.joint_pd import JointPD
9 from rex.multi_file_resource import (MultiFileNSRDB, MultiFileResource,
10 MultiFileWTK)
11 from rex.multi_time_resource import (MultiTimeNSRDB, MultiTimeResource,
12 MultiTimeWaveResource,
13 MultiTimeWindResource)
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/joint_pd/__init__.py:5, in <module>
1 # -*- coding: utf-8 -*-
2 """
3 Resource joint probability distribution (JointPD) calculators
4 """
----> 5 from .joint_pd import JointPD
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/joint_pd/joint_pd.py:15, in <module>
12 from warnings import warn
14 from rex.version import __version__
---> 15 from rex.renewable_resource import WindResource
16 from rex.resource import Resource
17 from rex.utilities.execution import SpawnProcessPool
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/renewable_resource.py:10, in <module>
7 import pandas as pd
8 import warnings
---> 10 from rex.resource import BaseResource
11 from rex.sam_resource import SAMResource
12 from rex.utilities.exceptions import (ResourceValueError, ExtrapolationWarning,
13 ResourceWarning, ResourceRuntimeError,
14 MoninObukhovExtrapolationError)
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/resource.py:11, in <module>
8 import os
9 import pandas as pd
---> 11 from rex.sam_resource import SAMResource
12 from rex.utilities.parse_keys import parse_keys, parse_slice
13 from rex.utilities.exceptions import ResourceKeyError, ResourceRuntimeError
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/sam_resource.py:11, in <module>
8 from warnings import warn
9 import logging
---> 11 from rex.utilities.exceptions import (ResourceKeyError, ResourceRuntimeError,
12 ResourceValueError, SAMInputWarning)
13 from rex.utilities.parse_keys import parse_keys
14 from rex.utilities.solar_position import SolarPosition
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/utilities/__init__.py:5, in <module>
1 # -*- coding: utf-8 -*-
2 """
3 rex utilities.
4 """
----> 5 from .execution import SpawnProcessPool
6 from .hpc import SLURM, PBS
7 from .loggers import (init_logger, init_mult, setup_logger, log_mem,
8 log_versions, LOGGERS)
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/utilities/execution.py:16, in <module>
13 import shlex
14 from warnings import warn
---> 16 from rex.utilities.loggers import LOGGERS, log_mem
17 from rex.utilities.exceptions import ExecutionError, ParallelExecutionWarning
20 logger = logging.getLogger(__name__)
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/utilities/loggers.py:19, in <module>
17 from rex.version import __version__
18 from rex.utilities.exceptions import LoggerWarning
---> 19 from rex.utilities.utilities import unstupify_path
21 FORMAT = '%(levelname)s - %(asctime)s [%(filename)s:%(lineno)d] : %(message)s'
22 LOG_LEVEL = {'INFO': logging.INFO,
23 'DEBUG': logging.DEBUG,
24 'WARNING': logging.WARNING,
25 'ERROR': logging.ERROR,
26 'CRITICAL': logging.CRITICAL}
File ~/anaconda3/envs/rex/lib/python3.10/site-packages/rex/utilities/utilities.py:8, in <module>
6 import inspect
7 import json
----> 8 import yaml
9 import os
10 from fnmatch import fnmatch
ModuleNotFoundError: No module named 'yaml'
grantbuster commented
I think it is:
Line 7 in 289e742
ryancoe commented
hmmm. I did a conda
install on macOS (10.15) and it is not getting installed.
# packages in environment at /Users/rcoe/anaconda3/envs/rex2:
#
# Name Version Build Channel
bzip2 1.0.8 h0d85af4_4 conda-forge
c-ares 1.18.1 h0d85af4_0 conda-forge
ca-certificates 2021.10.8 h033912b_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
click 8.1.2 py310h2ec42d9_0 conda-forge
h5py 3.6.0 nompi_py310h47026f8_100 conda-forge
hdf5 1.12.1 nompi_h0aa1fa2_104 conda-forge
krb5 1.19.3 hb98e516_0 conda-forge
libblas 3.9.0 13_osx64_openblas conda-forge
libcblas 3.9.0 13_osx64_openblas conda-forge
libcurl 7.82.0 h9dce1e3_0 conda-forge
libcxx 13.0.1 hc203e6f_0 conda-forge
libedit 3.1.20191231 h0678c8f_2 conda-forge
libev 4.33 haf1e3a3_1 conda-forge
libffi 3.4.2 h0d85af4_5 conda-forge
libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge
libgfortran5 9.3.0 h6c81a4c_23 conda-forge
liblapack 3.9.0 13_osx64_openblas conda-forge
libnghttp2 1.47.0 hca56917_0 conda-forge
libopenblas 0.3.18 openmp_h3351f45_0 conda-forge
libssh2 1.10.0 hd3787cc_2 conda-forge
libzlib 1.2.11 h6c3fc93_1014 conda-forge
llvm-openmp 13.0.1 hcb1a161_1 conda-forge
ncurses 6.3 he49afe7_0 conda-forge
nrel-rex 0.2.69 py_0 nrel
numpy 1.22.3 py310hb608527_1 conda-forge
openssl 3.0.2 h6c3fc93_1 conda-forge
pandas 1.4.2 py310h514ec25_0 conda-forge
pip 22.0.4 pyhd8ed1ab_0 conda-forge
psutil 5.9.0 py310h1961e1f_1 conda-forge
python 3.10.4 h1cc4136_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.10 2_cp310 conda-forge
pytz 2022.1 pyhd8ed1ab_0 conda-forge
readline 8.1 h05e3726_0 conda-forge
scipy 1.8.0 py310h47774c9_1 conda-forge
setuptools 61.3.1 py310h2ec42d9_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.37.1 hb516253_0 conda-forge
tk 8.6.12 h5dbffcc_0 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
tzdata 2022a h191b570_0 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xz 5.2.5 haf1e3a3_1 conda-forge
zlib 1.2.11 h6c3fc93_1014 conda-forge
grantbuster commented
Oh gotcha. I must have forgotten to update the conda requirements. The conda install is not included in our automated test suite so that must have slipped through the cracks. I updated the conda req at the file below but the conda package wont be updated until the next release:
https://github.com/NREL/rex/blob/main/conda.recipe/meta.yaml