scanpy
scanpy copied to clipboard
Unable to import scanpy on CentOS 7 with Python 3.9
- [ x] I have checked that this issue has not already been reported.
- [x ] I have confirmed this bug exists on the latest version of scanpy.
- [ ] (optional) I have confirmed this bug exists on the master branch of scanpy.
Hello
I installed scanpy with no errors or warnings. When I tried to import it, I get the error
import scanpy as sc
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-0074c9bc0b31> in <module>
----> 1 import scanpy as sc
path/lib/python3.9/site-packages/scanpy/__init__.py in <module>
6 from ._utils import check_versions
7
----> 8 check_versions()
9 del check_versions, within_flit
10
path/lib/python3.9/site-packages/scanpy/_utils/__init__.py in check_versions()
47 umap_version = pkg_version("umap-learn")
48
---> 49 if version.parse(anndata_version) < version.parse('0.6.10'):
50 from .. import __version__
51
path/lib/python3.9/site-packages/packaging/version.py in parse(version)
47 """
48 try:
---> 49 return Version(version)
50 except InvalidVersion:
51 return LegacyVersion(version)
path/lib/python3.9/site-packages/packaging/version.py in __init__(self, version)
262
263 # Validate the version and parse it into pieces
--> 264 match = self._regex.search(version)
265 if not match:
266 raise InvalidVersion(f"Invalid version: '{version}'")
TypeError: expected string or bytes-like object
Versions
linux
! cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
python
sys.version_info(major=3, minor=9, micro=2, releaselevel='final', serial=0)
hi @dm8000 did you install it with pip or conda? I would try to re installl with either of the two methods.
Hello @giovp
I used pip for the installation
Could you please ensure that you are attempting to import scanpy in a fresh, clean environment? Also, what's your Python version?
Could you please ensure that you are attempting to import scanpy in a fresh, clean environment? Also, what's your Python version?
the version would be 3.9.2
and I did try importing it on clean environment
@dm8000 does this issue still persist? If yes, please reopen.
I'd then also like to see the full pip list
output