I'm trying to install the python environment for hysplit on a redhat machine. When I run the pytest for hysplitplot I am getting a ton of errors that look like the following:
ImportError while importing test module '/home/2r2/hysplit.v5.0.0_RedHat/python/hysplitplot/tests/test_clist.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_clist.py:12: in <module>
from hysplitplot import clist
../hysplitplot/__init__.py:2: in <module>
from .conc.plot import ConcentrationPlot
../hysplitplot/conc/plot.py:21: in <module>
from hysplitdata import io
E ModuleNotFoundError: No module named 'hysplitdata'
From other posts I gather there is a missing package but I'm stuck.
MB
Python Environment Error
-
- Posts: 362
- Joined: May 8th, 2019, 1:31 pm
- Registered HYSPLIT User: Yes
Re: Python Environment Error
The hysplitdata package is also included in the Hysplit distribution. Please follow the installation instructions as described in <YOUR_HYSPLIT_PATH>/python/install_linux.txt. Then downgrade pandas to version 1.0.1: see viewtopic.php?p=6248#p6248.
Re: Python Environment Error
I did follow the instructions and downgraded the package but am still getting the same error when running pytest in the hysplitplot/tests/ directory. Pytest in the hysplitdata/tests/ directory runs properly.
result from running conda list:
pandas 1.0.1 pypi_0 pypi
(hysplit) [***]$ pytest
============================= test session starts =============================
platform linux -- Python 3.7.5, pytest-4.4.1, py-1.8.0, pluggy-0.13.1
rootdir: /home/2r2/hysplit.v5.0.0_RedHat/python/hysplitplot
collected 0 items / 24 errors
=================================== ERRORS ====================================
____________________ ERROR collecting tests/test_clist.py _____________________
ImportError while importing test module '/home/2r2/hysplit.v5.0.0_RedHat/python/hysplitplot/tests/test_clist.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_clist.py:12: in <module>
from hysplitplot import clist
../hysplitplot/__init__.py:2: in <module>
from .conc.plot import ConcentrationPlot
../hysplitplot/conc/plot.py:21: in <module>
from hysplitdata import io
E ModuleNotFoundError: No module named 'hysplitdata'
result from running conda list:
pandas 1.0.1 pypi_0 pypi
(hysplit) [***]$ pytest
============================= test session starts =============================
platform linux -- Python 3.7.5, pytest-4.4.1, py-1.8.0, pluggy-0.13.1
rootdir: /home/2r2/hysplit.v5.0.0_RedHat/python/hysplitplot
collected 0 items / 24 errors
=================================== ERRORS ====================================
____________________ ERROR collecting tests/test_clist.py _____________________
ImportError while importing test module '/home/2r2/hysplit.v5.0.0_RedHat/python/hysplitplot/tests/test_clist.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_clist.py:12: in <module>
from hysplitplot import clist
../hysplitplot/__init__.py:2: in <module>
from .conc.plot import ConcentrationPlot
../hysplitplot/conc/plot.py:21: in <module>
from hysplitdata import io
E ModuleNotFoundError: No module named 'hysplitdata'
Re: Python Environment Error
I did follow the instructions and downgraded pandas and I still get the error when running pytest in hysplitplot/tests. Pytest runs successfully for hysplitdata/tests.
After running conda list pandas appears as:
pandas 1.0.1 pypi_0 pypi
After running conda list pandas appears as:
pandas 1.0.1 pypi_0 pypi
-
- Posts: 362
- Joined: May 8th, 2019, 1:31 pm
- Registered HYSPLIT User: Yes
Re: Python Environment Error
Could you examine the easy-install.pth file in your anaconda3 directory? If your anaconda3 is installed in your home directory, the file is located at ${HOME}/anaconda3/envs/hysplit/lib/python3.7/site-packages. It is a text file. It should list the hysplitdata and hysplitplot packages along with others.