aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
424 stars 179 forks source link

[BUG] Installation error #518

Open as7a5 opened 10 months ago

as7a5 commented 10 months ago

Describe the bug pyscenic -h errors out after fresh installation via conda. Seems numpy new version does not include np.object. Only object is there:
Following steps of installation on anaconda3 (2022.10):

(pyscenic) [root@gn-0012 site-packages]$ pyscenic -h /gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/lib/python3.10/site-packages/pyscenic/transform.py:42: FutureWarning: In the future np.object will be defined as the corresponding NumPy scalar. ("Enrichment", COLUMN_NAME_ANNOTATION): np.object, Traceback (most recent call last): File "/gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/bin/pyscenic", line 5, in from pyscenic.cli.pyscenic import main File "/gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/lib/python3.10/site-packages/pyscenic/cli/pyscenic.py", line 26, in from pyscenic.prune import _prepare_client, find_features, prune2df File "/gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/lib/python3.10/site-packages/pyscenic/prune.py", line 27, in from .transform import ( File "/gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/lib/python3.10/site-packages/pyscenic/transform.py", line 42, in ("Enrichment", COLUMN_NAME_ANNOTATION): np.object, File "/gpfs/share/apps/anaconda3/gpu/2022.10/envs/pyscenic/lib/python3.10/site-packages/numpy/init.py", line 324, in getattr raise AttributeError(__former_attrs_[attr]) AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'object'?

Steps to reproduce the behavior

  1. Command run when the error occurred:

    ...
  2. Error encountered:

    ...

Expected behavior A clear and concise description of what you expected to happen.

Please complete the following information:

ghuls commented 9 months ago

Install an older version of numpy: pip install 'numpy<1.24' Or use the latest git version. It has this patched: https://github.com/aertslab/pySCENIC/commit/eaf23eb1fdcaae79b273de56b374b71aa8afde5a

Or use the prebuild Docker/Podman/Singularity/Apptainer images: https://pyscenic.readthedocs.io/en/latest/installation.html#docker-podman

liuyifang commented 9 months ago

pip install git+https://github.com/aertslab/pySCENIC@eaf23eb1fdcaae79b273de56b374b71aa8afde5a works for me

yuanyuan1206 commented 2 months ago

Install an older version of numpy: pip install 'numpy<1.24' Or use the latest git version. It has this patched: eaf23eb

Or use the prebuild Docker/Podman/Singularity/Apptainer images: https://pyscenic.readthedocs.io/en/latest/installation.html#docker-podman

it works for me