Intermediate tutorial - h5py import error

106 views
Skip to first unread message

Chloe Sheen

unread,
Sep 20, 2021, 2:08:43 PM9/20/21
to westpa-users
Hi everyone,

I've been trying to initialize and run the intermediate_p53 tutorial in a fresh conda environment (2020.05-test) as Anthony recommended in another thread. However, when I try initializing, I can't seem to get past this import error for h5py. 

(westpa-2020.05-test) [csheen@Voldemort intermediate_p53]$ ./init.sh
mkdir: cannot create directory ‘job_logs’: File exists
Traceback (most recent call last):
  File "/home/csheen/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/cmds/w_init.py", line 9, in <module>
    import work_managers
  File "/home/csheen/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/wwmgr/work_managers/__init__.py", line 12, in <module>
    from .core import WorkManager, WMFuture, FutureWatcher
  File "/home/csheen/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/wwmgr/work_managers/core.py", line 8, in <module>
    import h5py
ModuleNotFoundError: No module named 'h5py'

I've installed h5py via pip and it seems to work fine:

(westpa-2020.05-test) [csheen@Voldemort intermediate_p53]$ python3
Python 3.9.7 | packaged by conda-forge | (default, Sep 14 2021, 01:17:55) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
>>> 

and I've confirmed that it's been installed via conda list --show-channel-urls, which shows:
h5py                      2.10.0          nompi_py39h98ba4bc_106    conda-forge

What do you think the issue could be? 

Thanks,
Chloe Sheen

Leung, Jeremy

unread,
Sep 20, 2021, 3:47:10 PM9/20/21
to westpa...@googlegroups.com
Hi Chloe,

It's likely that the env.sh does not source the correct environment, causing the work manager to run the system python (which does not have h5py). 

Would you be able to double check your env.sh to see if it's calling the correct $WEST_PYTHON? If you're using the default env.sh, try using the one from the basic_nacl_amber. Alternatively, you can upload your env.sh and we can help you tune it.

Regards,

Jeremy L.
--
Jeremy M. G. Leung
PhD Candidate, Chemistry
Graduate Student Researcher, Chemistry (Chong Lab)
University of Pittsburgh | 219 Parkman Avenue, Pittsburgh, PA 15260
jml...@pitt.edu | [He, Him, His]

--
You received this message because you are subscribed to the Google Groups "westpa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to westpa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/westpa-users/0ec08606-1b80-4940-a660-11d89a94f643n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages