Closed namsaraeva closed 7 months ago
Hi! @Zethson Please may I have some assistance with this too? I note that this issue has been closed 3 weeks ago, but it is still happening for me using a fresh install of pertpy.
ImportError Traceback (most recent call last) Cell In[1], line 9 7 import matplotlib.pyplot as plt 8 import mudata as mu ----> 9 import pertpy as pt
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/init.py:19 17 from . import plot as pl 18 from . import preprocessing as pp ---> 19 from . import tools as tl
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/init.py:24 22 print("[bold yellow]To use sccoda or tasccoda please install ete3 with [green]pip install ete3") 23 else: ---> 24 raise e
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/init.py:18 15 from pertpy.tools._scgen import SCGEN 17 try: ---> 18 from pertpy.tools._coda._sccoda import Sccoda 19 from pertpy.tools._coda._tasccoda import Tasccoda 20 except ImportError as e:
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/_coda/_sccoda.py:12 10 from anndata import AnnData 11 from jax import random ---> 12 from jax.config import config 13 from mudata import MuData 14 from numpyro.infer import Predictive
ImportError: cannot import name 'config' from 'jax.config' (/scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/jax/config.py)
Thank you so much!
Best Regards, Samuel
Hi! @Zethson Please may I have some assistance with this too? I note that this issue has been closed 3 weeks ago, but it is still happening for me using a fresh install of pertpy.
ImportError Traceback (most recent call last) Cell In[1], line 9 7 import matplotlib.pyplot as plt 8 import mudata as mu ----> 9 import pertpy as pt
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/init.py:19 17 from . import plot as pl 18 from . import preprocessing as pp ---> 19 from . import tools as tl
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/init.py:24 22 print("[bold yellow]To use sccoda or tasccoda please install ete3 with [green]pip install ete3") 23 else: ---> 24 raise e
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/init.py:18 15 from pertpy.tools._scgen import SCGEN 17 try: ---> 18 from pertpy.tools._coda._sccoda import Sccoda 19 from pertpy.tools._coda._tasccoda import Tasccoda 20 except ImportError as e:
File /scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/pertpy/tools/_coda/_sccoda.py:12 10 from anndata import AnnData 11 from jax import random ---> 12 from jax.config import config 13 from mudata import MuData 14 from numpyro.infer import Predictive
ImportError: cannot import name 'config' from 'jax.config' (/scbio4/home/samuel/miniforge3/envs/py3116-env/lib/python3.11/site-packages/jax/config.py)
Thank you so much!
Best Regards, Samuel
Hi again, just to update that I managed to solve this by compiling the latest version of pertpy instead of using pip install. Thank you!
Sorry about that. We ll make a release ASAP
@SamuelCWJ how do you compile the latest version? I'm hitting the same error.
@SamuelCWJ how do you compile the latest version? I'm hitting the same error.
Hi @spatts14 ,
I followed their instructions here: https://pertpy.readthedocs.io/en/latest/installation.html
$ curl -OJL https://github.com/theislab/pertpy/tarball/master Extract the files from the tar.gz folder $ cd (into the extracted folder) $ pip install .
You can also just git clone
the main branch and don't have to download/extract the tar ball.
Again, sorry about this - release ASAP!
Thank you both! All set now :)
how to fix this "ImportError: cannot import name 'config' from 'jax.config'"
@spatts14 @Zethson, how to fix this "ImportError: cannot import name 'config' from 'jax.config'"?
@majmal7 please install from the main branch as outlined here. A new release will happen within the next 3-7 days.
Report
scvi-tools were installed from main branch, the environment was brand new. jax was at the latest version.
Version information
No response