jbloomlab / dms_tools2

software for the analysis and visualization of deep mutational scanning data
GNU General Public License v3.0
32 stars 20 forks source link

PIP Error when Installing dms_tools2 #72

Open kevinmyers opened 6 months ago

kevinmyers commented 6 months ago

I am trying to install dms_tools2. I have tired both pip install dms_tools2 --user as well as using the cloned GitHub repo command pip install -e . --user. I am on a Mac running 14.4.1 and have Python 3.12 installed. I get the following error:

Obtaining file:///Users/kevinmyers/bin/dms_tools2
  Preparing metadata (setup.py) ... done
Collecting attrs>=17.4.0 (from dms_tools2==2.6.12)
  Using cached attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB)
Collecting biopython>=1.68 (from dms_tools2==2.6.12)
  Using cached biopython-1.83-cp312-cp312-macosx_10_9_x86_64.whl.metadata (13 kB)
Collecting pysam>=0.13 (from dms_tools2==2.6.12)
  Using cached pysam-0.22.0-cp312-cp312-macosx_10_9_x86_64.whl.metadata (1.5 kB)
Collecting pandas<1.0,>=0.23 (from dms_tools2==2.6.12)
  Using cached pandas-0.25.3.tar.gz (12.6 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      /private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/setup.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        import pkg_resources
      /private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/setup.py:489: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        LooseVersion(python_target) < "10.9"
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/setup.py", line 812, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/versioneer.py", line 1440, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/versioneer.py", line 1369, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-533ia5xz/pandas_73c032c92cef440083a4cd398b9bee45/versioneer.py", line 401, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I'm not sure what I can do to fix this. Any ideas?

jbloom commented 6 months ago

Just doing some quick Google-ing, it seems possible that this error has something to do with the packaging changing in Python 3.12, which dms_tools2 has never been tested against. Does it work if you use an earlier version of Python, like 3.11 or 3.10?

kevinmyers commented 6 months ago

I'll give that a try!

That seemed to work! It looks like it's installing it now! Thank you for the quick reply!

kevinmyers commented 6 months ago

Well, now I get this error:

Successfully built dms_tools2 umi_tools weblogo pybktree
Failed to build matplotlib numpy pandas phydms pystan
ERROR: Could not build wheels for matplotlib, numpy, pandas, phydms, pystan, which is required to install pyproject.toml-based projects

Do I need to install these manually in the env?

jbloom commented 6 months ago

I don't know, but I would try just installing them separately with pip if they aren't building with what you are doing right now.

kevinmyers commented 6 months ago

Ok. thanks!