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

No module named 'gseapy.gse' #214

Open
ShriHarshaAdapalaThirumala opened this issue Jul 12, 2023 · 8 comments
Open

No module named 'gseapy.gse' #214

ShriHarshaAdapalaThirumala opened this issue Jul 12, 2023 · 8 comments
Labels

Comments

@ShriHarshaAdapalaThirumala

Setup

I am reporting a problem with GSEApy version, Python version, and operating
system as follows:

import sys; print(sys.version)
import platform; print(platform.python_implementation()); print(platform.platform())

3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:41) [Clang 15.0.7 ]
CPython
macOS-13.4.1-arm64-arm-64bit

(Please copy and run the above in your Python, and copy-and-paste the output)

Expected behaviour

import gseapy as gp

Should get import without any issue

Actual behaviour


ModuleNotFoundError Traceback (most recent call last)
Cell In[57], line 1
----> 1 import gseapy as gp

File ~/Documents/programming_environments/bio_env/lib/python3.11/site-packages/gseapy/init.py:9
7 from .biomart import Biomart
8 from .enrichr import Enrichr
----> 9 from .gsea import GSEA, Prerank, Replot, SingleSampleGSEA
10 from .parser import get_library_name
11 from .plot import barplot, dotplot, gseaplot, heatmap

File ~/Documents/programming_environments/bio_env/lib/python3.11/site-packages/gseapy/gsea.py:15
12 import pandas as pd
14 from gseapy.base import GSEAbase
---> 15 from gseapy.gse import Metric, gsea_rs, prerank_rs, ssgsea_rs # import gseapy rust lib
16 from gseapy.parser import gsea_cls_parser
17 from gseapy.plot import gseaplot

ModuleNotFoundError: No module named 'gseapy.gse'

Steps to reproduce

Just imported.

@zqfang
Copy link
Owner

zqfang commented Jul 12, 2023

please use pip install. Bioconda don't have py311 build yet.

# install rust compiler
curl https://sh.rustup.rs -sSf | sh -s -- -y
# export rust compiler
export PATH="$PATH:$HOME/.cargo/bin"
# install gseapy
pip install gseapy

@ShriHarshaAdapalaThirumala
Copy link
Author

@ShriHarshaAdapalaThirumala
Copy link
Author

please use pip install. Bioconda don't have py311 build yet.

pip install gseapy

Getting following error on trying to install via pip

image

@zqfang
Copy link
Owner

zqfang commented Jul 12, 2023

I'm sorry, I just notice you're using "ARM-Macos". I don't have a M1-chip Mac to build the binary.

In this case, you have to install rust additionally, see here: https://www.rust-lang.org/tools/install

@mari-ga
Copy link

mari-ga commented Aug 28, 2023

Hi, sorry I'm having exactly the same issue. I installed Rust and then gseapy using conda but I still get the same error:
ModuleNotFoundError: No module named 'gseapy.gse' did you manage to find a solution for this?
I'm also working from ARM-MacOS - M2-Chip

@zqfang
Copy link
Owner

zqfang commented Aug 28, 2023

@mari-ga, uninstall the gseapy and run

pip install gseapy

since v1.0.6, MacOS-ARM64 pre-compiled binaries are shipped.

if it still failed, then follow the code below

# install rust compiler
curl https://sh.rustup.rs -sSf | sh -s -- -y
# export rust compiler
export PATH="$PATH:$HOME/.cargo/bin"
# install gseapy
pip install gseapy

@zqfang zqfang added the FAQ label Aug 29, 2023
@zqfang
Copy link
Owner

zqfang commented Jul 18, 2024 via email

@Yecats77
Copy link

Yecats77 commented Jul 18, 2024 via email

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

No branches or pull requests

4 participants