PCMDI / cmor3_documentation

CMOR3 User Guide
MIT License
0 stars 5 forks source link

Testing CMOR 3.7.1 fails with " No module named testsrunner" error #120

Closed strandwg closed 1 year ago

strandwg commented 1 year ago

I'm following the instructions at

https://cmor.llnl.gov/mydoc_cmor3_conda/

and the process fails with the error

[...] fatal: destination path 'cmor' already exists and is not an empty directory. Traceback (most recent call last): File "run_tests.py", line 3, in from testsrunner import TestRunnerBase ImportError: No module named testsrunner

mauzey1 commented 1 year ago

@strandwg Try installing testsrunner without CDMS2.

conda install -n CMOR -c conda-forge -c cdat/label/nightly -c cdat testsrunner

I think the problems is when you ran the installation of testsrunner it was also trying to install CDMS2. The CDMS2 library will no longer be supported by the end of 2023 so the developers didn't create a Python 3.11 version.

@durack1 @taylor13 I think we should remove the installation of CDMS2 in the testing step since it is only used used by a few tests, and will no longer be supported in the future.

taylor13 commented 1 year ago

@mauzey1 I agree that tests relying on unsupported software should be eliminated from our test suite.

mauzey1 commented 1 year ago

@strandwg I've updated the conda installation instructions so that you don't need to install CDMS2 when testing CMOR. If other issues arise with testing CMOR, then please open another issue. I will close this one.

strandwg commented 1 year ago

Still getting the same error:

python run_tests.py -v2 -H -n1 Test/test_python_CMIP6_CV*.py Traceback (most recent call last): File "run_tests.py", line 3, in from testsrunner import TestRunnerBase ImportError: No module named testsrunner

and run_tests.py:

import os import sys from testsrunner import TestRunnerBase

test_suite_name = 'cmor'

workdir = os.getcwd()

runner = TestRunnerBase(test_suite_name) ret_code = runner.run(workdir) sys.exit(ret_code)

mauzey1 commented 1 year ago

@strandwg Could you confirm for me that you have testsrunner in your conda environment. Please enter conda list in the terminal that you are using to run the CMOR tests and paste the results here.

strandwg commented 1 year ago

Here you go:

packages in environment at /glade/u/apps/opt/conda:

#

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge brotlipy 0.7.0 py310h5764c6d_1004 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2022.6.15 ha878542_0 conda-forge certifi 2022.6.15 py310hff52083_0 conda-forge cffi 1.15.1 py310h255011f_0 conda-forge charset-normalizer 2.1.0 pyhd8ed1ab_0 conda-forge colorama 0.4.5 pyhd8ed1ab_0 conda-forge conda 4.13.0 py310hff52083_1 conda-forge conda-package-handling 1.8.1 py310h5764c6d_1 conda-forge cryptography 37.0.4 py310h597c629_0 conda-forge icu 70.1 h27087fc_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge krb5 1.19.3 h3790be6_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge libarchive 3.5.2 hb890918_3 conda-forge libcurl 7.83.1 h7bff187_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 12.1.0 h8d9b700_16 conda-forge libgomp 12.1.0 h8d9b700_16 conda-forge libiconv 1.16 h516909a_0 conda-forge libmamba 0.25.0 hd8a31e3_1 conda-forge libmambapy 0.25.0 py310hab0e683_1 conda-forge libnghttp2 1.47.0 h727a467_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libsolv 0.7.22 h6239696_0 conda-forge libssh2 1.10.0 ha56f1ee_2 conda-forge libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libxml2 2.9.14 h22db469_3 conda-forge libzlib 1.2.12 h166bdaf_2 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge lzo 2.10 h516909a_1000 conda-forge mamba 0.25.0 py310hf87f941_1 conda-forge ncurses 6.3 h27087fc_1 conda-forge openssl 1.1.1q h166bdaf_0 conda-forge pip 22.2.1 pyhd8ed1ab_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.3 py310h5764c6d_1010 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 py310hff52083_5 conda-forge python 3.10.5 h582c2e5_0_cpython conda-forge python_abi 3.10 2_cp310 conda-forge readline 8.1.2 h0f457ee_0 conda-forge reproc 14.2.3 h7f98852_0 conda-forge reproc-cpp 14.2.3 h9c3ff4c_0 conda-forge requests 2.28.1 pyhd8ed1ab_0 conda-forge ruamel 1.0 py310hff52083_6 conda-forge ruamel_yaml 0.15.80 py310h5764c6d_1007 conda-forge setuptools 63.3.0 py310hff52083_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.39.2 h4ff8645_0 conda-forge tk 8.6.12 h27826a3_0 conda-forge tqdm 4.64.0 pyhd8ed1ab_0 conda-forge tzdata 2022a h191b570_0 conda-forge urllib3 1.26.11 pyhd8ed1ab_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h7f98852_2 conda-forge yaml-cpp 0.7.0 h27087fc_1 conda-forge zlib 1.2.12 h166bdaf_2 conda-forge zstd 1.5.2 h8a70e8d_2 conda-forge

mauzey1 commented 1 year ago

Okay, it appears that you didn't activate your conda environment since neither cmor or testsrunner are in the list. Please run conda activate CMOR.