dpeerlab / Palantir

Single cell trajectory detection
https://palantir.readthedocs.io
GNU General Public License v2.0
213 stars 50 forks source link

palantier + py3.7+ typing loading error #125

Closed dxl3742 closed 11 months ago

dxl3742 commented 11 months ago

Hi, i have palantir successfully installed, but I cant load due to the Literal typing error in python 3.7 (dandelion) [chenzhenzhen@localhost ~]$ pip install palantir Collecting palantir Downloading palantir-1.3.1-py3-none-any.whl (49 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.6/49.6 kB 254.9 kB/s eta 0:00:00 Requirement already satisfied: scipy>=1.3 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.7.3) Requirement already satisfied: matplotlib>=2.2.2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (3.5.3) Requirement already satisfied: fcsparser>=0.1.2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (0.2.4) Requirement already satisfied: mellon>=1.3.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.3.1) Requirement already satisfied: scanpy>=1.6.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.9.3) Requirement already satisfied: leidenalg>=0.9.1 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (0.10.1) Requirement already satisfied: numpy>=1.14.2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.21.6) Requirement already satisfied: scikit-learn in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.0.2) Requirement already satisfied: anndata>=0.8.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (0.8.0) Requirement already satisfied: Cython in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (3.0.0) Requirement already satisfied: cmake in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (3.27.2) Requirement already satisfied: tzlocal in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (5.0.1) Requirement already satisfied: pygam in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (0.8.0) Requirement already satisfied: networkx>=2.1 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (2.6.3) Requirement already satisfied: joblib in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.3.2) Requirement already satisfied: pandas>=0.22.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from palantir) (1.1.5) Requirement already satisfied: natsort in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from anndata>=0.8.0->palantir) (8.4.0) Requirement already satisfied: h5py>=3 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from anndata>=0.8.0->palantir) (3.8.0) Requirement already satisfied: importlib_metadata>=0.7 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from anndata>=0.8.0->palantir) (6.7.0) Requirement already satisfied: typing_extensions in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from anndata>=0.8.0->palantir) (4.7.1) Requirement already satisfied: packaging>=20 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from anndata>=0.8.0->palantir) (23.1) Requirement already satisfied: setuptools in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from fcsparser>=0.1.2->palantir) (65.5.1) Requirement already satisfied: six in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from fcsparser>=0.1.2->palantir) (1.16.0) Requirement already satisfied: igraph<0.11,>=0.10.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from leidenalg>=0.9.1->palantir) (0.10.6) Requirement already satisfied: pillow>=6.2.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (9.5.0) Requirement already satisfied: pyparsing>=2.2.1 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (3.1.1) Requirement already satisfied: python-dateutil>=2.7 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (2.8.2) Requirement already satisfied: kiwisolver>=1.0.1 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (1.4.4) Requirement already satisfied: cycler>=0.10 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from matplotlib>=2.2.2->palantir) (4.38.0) Requirement already satisfied: jaxopt in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from mellon>=1.3.0->palantir) (0.8) Requirement already satisfied: jax in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from mellon>=1.3.0->palantir) (0.3.25) Requirement already satisfied: pytz>=2017.2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from pandas>=0.22.0->palantir) (2023.3) Requirement already satisfied: tqdm in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (4.66.1) Requirement already satisfied: session-info in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (1.0.0) Requirement already satisfied: numba>=0.41.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (0.56.4) Requirement already satisfied: patsy in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (0.5.3) Requirement already satisfied: statsmodels>=0.10.0rc2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (0.13.5) Requirement already satisfied: umap-learn>=0.3.10 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (0.5.3) Requirement already satisfied: seaborn in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scanpy>=1.6.0->palantir) (0.12.2) Requirement already satisfied: threadpoolctl>=2.0.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from scikit-learn->palantir) (3.1.0) Requirement already satisfied: future in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from pygam->palantir) (0.18.3) Requirement already satisfied: progressbar2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from pygam->palantir) (4.2.0) Requirement already satisfied: backports.zoneinfo in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from tzlocal->palantir) (0.2.1) Requirement already satisfied: texttable>=1.6.2 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from igraph<0.11,>=0.10.0->leidenalg>=0.9.1->palantir) (1.6.7) Requirement already satisfied: zipp>=0.5 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from importlib_metadata>=0.7->anndata>=0.8.0->palantir) (3.15.0) Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from numba>=0.41.0->scanpy>=1.6.0->palantir) (0.39.1) Requirement already satisfied: pynndescent>=0.5 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from umap-learn>=0.3.10->scanpy>=1.6.0->palantir) (0.5.10) Requirement already satisfied: opt-einsum in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from jax->mellon>=1.3.0->palantir) (3.3.0) Requirement already satisfied: jaxlib>=0.1.69 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from jaxopt->mellon>=1.3.0->palantir) (0.3.25) Requirement already satisfied: python-utils>=3.0.0 in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from progressbar2->pygam->palantir) (3.5.2) Requirement already satisfied: stdlib-list in /home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/site-packages (from session-info->scanpy>=1.6.0->palantir) (0.9.0) Installing collected packages: palantir Successfully installed palantir-1.3.1 Error: ImportError: cannot import name 'Literal' from 'typing' (/home2/chenzhenzhen/anaconda3/envs/dandelion/lib/python3.7/typing.py)

katosh commented 11 months ago

Hi @dxl3742,

Thank you for bringing this to our attention. We have decided to discontinue support for Python 3.7, aligning with its "end-of-life" status as indicated by Python's development team (Python Dev Guide).

The necessary changes have been made in this commit: 7ef02609db8c0eec3c8eaaa094bda5cb388ae39c.

You can now update Palantir with the following command to enforce Python 3.8 as the minimum required version:

pip install 'git+https://github.com/dpeerlab/Palantir'

This should provide compatibility with Python 3.8 and above.