calico / scnym

Semi-supervised adversarial neural networks for classification of single cell transcriptomics data
https://scnym.research.calicolabs.com
Apache License 2.0
73 stars 12 forks source link

install instructions dont work - scnym won't install with python 3.10 #19

Closed njbernstein closed 2 years ago

njbernstein commented 3 years ago

By default conda install python 3.10 but many required versions of packages for scnym are not available.

(scnym) nicholas@sci-pvm-nicholas:~$ pip install scnym==0.3.2
Collecting scnym==0.3.2
  Using cached scnym-0.3.2-py2.py3-none-any.whl (68 kB)
Collecting scikit-misc==0.1.3
  Using cached scikit-misc-0.1.3.tar.gz (887 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/nicholas/miniconda3/envs/scnym/bin/python3.1 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mwr6kflj/scikit-misc_98238cf960f14555a7581927dfe035cc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mwr6kflj/scikit-misc_98238cf960f14555a7581927dfe035cc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f3_rfcls
       cwd: /tmp/pip-install-mwr6kflj/scikit-misc_98238cf960f14555a7581927dfe035cc/
  Complete output (7 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-mwr6kflj/scikit-misc_98238cf960f14555a7581927dfe035cc/setup.py", line 170, in <module>
      setup_package()
    File "/tmp/pip-install-mwr6kflj/scikit-misc_98238cf960f14555a7581927dfe035cc/setup.py", line 144, in setup_package
      from numpy.distutils.core import setup, numpy_cmdclass
  ModuleNotFoundError: No module named 'numpy'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/b3/42/1cb9d9aa545e2a459dbc235e2d15e733876431397b1e20b28b80b5e3755e/scikit-misc-0.1.3.tar.gz#sha256=439bded1d0b549c06bd8d0f167d7b9ac6ed18fd18bbd15eec02b31820b0bb4dc (from https://pypi.org/simple/scikit-misc/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement scikit-misc==0.1.3 (from scnym) (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4)
ERROR: No matching distribution found for scikit-misc==0.1.3
(scnym) nicholas@sci-pvm-nicholas:~$ python 
Python 3.10.0 | packaged by conda-forge | (default, Oct 12 2021, 21:24:52) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

python 3.8 does work

jacobkimmel commented 2 years ago

It seems like this is rooted in a couple different issues that arose between 3.8 -> 3.10:

  1. An update in setuptools>=38 that breaks support for use_2to3 in project builds. A couple of the common single cell packages haven't updated their build tools to account for this yet (e.g. louvain). https://setuptools.pypa.io/en/latest/history.html#v58-0-0
  2. scikit-misc seems to misspecify their build tools for the newest python versions, but I found we could drop the dependency.
  3. torch is not yet supported in python=3.10

I've added a note to the README to encourage python=3.8 for users given the torch issues. I'll revisit supporting newer python versions when major dependencies add support.

Addressed in #18