Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't access python modules #59

Open
svedwards opened this issue Dec 10, 2024 · 5 comments
Open

can't access python modules #59

svedwards opened this issue Dec 10, 2024 · 5 comments

Comments

@svedwards
Copy link

Hello Kern Lab -

I've just installed ReLERNN but am having trouble running the example file. It seems as if it can't find the appropriate python modules. The error looks like this:

Traceback (most recent call last):
File "/n/holylfs04/LABS/edwards_lab/Lab/sedwards/ReLERNN/ReLERNN/ReLERNN_SIMULATE", line 7, in
from ReLERNN.imports import *
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/ReLERNN/init.py", line 3, in
from ReLERNN.imports import *
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/ReLERNN/imports.py", line 4, in
import msprime as msp
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/msprime/init.py", line 37, in
from msprime.ancestry import (
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/msprime/ancestry.py", line 41, in
from . import demography as demog
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/msprime/demography.py", line 43, in <modul$
import demes
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/demes/init.py", line 9, in
from .demes import (
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/demes/demes.py", line 13, in
from .load_dump import dumps as demes_dumps
File "/n/home06/sedwards/.local/lib/python3.10/site-packages/demes/load_dump.py", line 11, in
import ruamel.yaml
ModuleNotFoundError: No module named 'ruamel'
Traceback (most recent call last):

also farther down:

ModuleNotFoundError: No module named 'h5py'

Sorry if I am not providing enough information. I get a similar error when I run the singularity. Happy to provide additional info to help clarify the problem.

@svedwards
Copy link
Author

I installed using the method listed on the web site. I made a conda environment then once in that environment I ran:

$ git clone https://github.com/kr-colab/ReLERNN.git
$ cd ReLERNN
$ pip install .

@andrewkern
Copy link
Member

andrewkern commented Dec 10, 2024

Hi @svedwards -- this seems like an installation issue. the h5py package should come along with tensorflow and the ReLERNN modules should just install with pip as you've tried.

I just tried out our suggested workflow on an ubuntu machine with a global install of tensorflow / cuda. The installation went like this

$ conda create -n relernn_test python=3.10 --yes
$ conda activate relernn_test
$ cd ReLERNN
$ which pip # confirm correct path to pip in my new conda env
$ pip install .
$ cd examples
$ ./example_pipeline.sh  # worked!

how was tensorflow installed on your machine? happy to help debug that too

cheers,
Andy

@svedwards
Copy link
Author

Hi Andrew - thanks for the quick response. It very likely is my tensorflow installation - I think I was trying to use someone else's installation but obviously wasn't connecting with it properly. My protocol for installing tensorflow is here: https://docs.rc.fas.harvard.edu/kb/tensorflow/ but after the second step ('mamba create ...') it's complaining:
Looking for: ['python=3.10', 'pip', 'wheel']

[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal

I can check with my local computing staff and will also try the singularity container. I will check in tomorrow evening if I am still in trouble. Thank you!

@svedwards
Copy link
Author

I'm working on a linux-64 machine

@andrewkern
Copy link
Member

tensorflow / cuda installs can be a pain. let me know if you need recommendations on how to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants