stjude / punctatools

Detection, colocalization, and quantification of spots / puncta
Other
9 stars 7 forks source link

Installation error: subprocess-exited-with-error, use_2to3 is invalid #16

Closed raecv closed 2 years ago

raecv commented 2 years ago

Encountered error message while installing or creating a punctatools environment on macOS Monterey Version 12.3.1, conda 4.13.0.

Running either of the following lines to install or create a punctatools env python -m pip install git+https://github.com/stjude/punctatools.git conda env create -f punctatools.yml --force resulted in the following error: punctatools_env-error.txt

The main issue seems to be an error with the use_2to3 command in PyVCF setup:

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in PyVCF setup command: use_2to3 is invalid.
      [end of output]

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

Solution

This seems to be an error with the setuptools version as described here: [https://github.com/KarchinLab/open-cravat/issues/98], which can be fixed by building the punctatools conda env in the following way:

# create a new conda environment 
conda create -n punctatools python==3.9
# the correct version of setuptools needed to be install for pyvcf to work
pip install "setuptools<58" --upgrade
pip uninstall pyvcf # if already installed
pip install pyvcf
# downloaded the punctatools packages to this location
python -m pip install git+https://github.com/stjude/punctatools.git`
amedyukhina commented 2 years ago

Hi Raeline,

thanks for bringing up this issue and providing the details. I will see whether I can integrate this solution into the installation.

Cheers, Anna

amedyukhina commented 2 years ago

I have added PyVCF separately to the installation requirements.

For the installation from yml, pyvcf is now installed via conda. For the pip installation, I had to downgrade pyvcf to version 0.4.3.

This has fixed the issue (at least for me), and the installation should now work with both options:

python -m pip install git+https://github.com/stjude/punctatools.git conda env create -f punctatools.yml

Let me know if you still run into problems.