data-fun / 3d-genome-builder

3DGB is a workflow to build 3D models of genomes from HiC data
BSD 3-Clause "New" or "Revised" License
13 stars 3 forks source link

Could not create conda environment from `.../workflow.yml` #12

Open TobyBaril opened 1 month ago

TobyBaril commented 1 month ago

Hi, I have followed the instructions to download and install everything and checked this has worked correctly.

I have had a couple of issues so far and cannot run the pipeline:

Firstly, there was a relative path in Snakemake that seemed to cause some problems:

Using profile smk_profile for setting default command line arguments.
Building DAG of jobs...
MissingInputException in rule create_HiC_Pro_config in file /data/tobias/3dgb/3d-genome-builder/Snakefile, line 180:
Missing input files for rule create_HiC_Pro_config:
    output: HiC-Pro/config.txt
    affected files:
        ../templates/HiC-Pro_config.template

I fixed this by changing ../templates/HiC-Pro_config.template to an absolute full path.

Next, I cannot run the pipeline due to issues with deprecated commands in NumPy and issues with pip, as far as I can understand from the error output:

Creating conda environment ../3d-genome-builder/envs/workflow.yml...
Downloading and installing remote packages.
CreateCondaEnvironmentException:
Could not create conda environment from /data/tobias/3dgb/3d-genome-builder/envs/workflow.yml:
Command:
mamba env create --quiet --file "/data/tobias/3dgb/Vdahliae_CQ2/.snakemake/conda/1d170e687b9118d7147e0605da88a62b_.yaml" --prefix "/data/tobias/3dgb/Vdahliae_CQ2/.snakemake/conda/1d170e687b9118d7147e0605da88a62b_"
Output:
/data/tobias/miniconda3/lib/python3.12/argparse.py:2006: FutureWarning: `remote_definition` is deprecated and will be removed in 25.9. Use `conda env create --file=URL` instead.
  action(self, namespace, argument_values, option_string)
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies.  Conda may not use the correct pip to install your packages, and they may end up in the wrong place.  Please add an explicit pip dependency.  I'm adding one for you, but still nagging you.
Channels:
 - defaults
 - bioconda
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Installing pip dependencies: ...working... Pip subprocess error:
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      /tmp/pip-install-a48b9ds2/pastis_177d89d375bf4698bc15da605e272f14/setup.py:121: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

        from numpy.distutils.core import setup
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-a48b9ds2/pastis_177d89d375bf4698bc15da605e272f14/setup.py", line 129, in <module>
          setup_package()
        File "/tmp/pip-install-a48b9ds2/pastis_177d89d375bf4698bc15da605e272f14/setup.py", line 121, in setup_package
          from numpy.distutils.core import setup
        File "/data/tobias/3dgb/Vdahliae_CQ2/.snakemake/conda/1d170e687b9118d7147e0605da88a62b_/lib/python3.9/site-packages/numpy/distutils/core.py", line 24, in <module>
          from numpy.distutils.command import config, config_compiler, \
        File "/data/tobias/3dgb/Vdahliae_CQ2/.snakemake/conda/1d170e687b9118d7147e0605da88a62b_/lib/python3.9/site-packages/numpy/distutils/command/config.py", line 19, in <module>
          from numpy.distutils.mingw32ccompiler import generate_manifest
        File "/data/tobias/3dgb/Vdahliae_CQ2/.snakemake/conda/1d170e687b9118d7147e0605da88a62b_/lib/python3.9/site-packages/numpy/distutils/mingw32ccompiler.py", line 28, in <module>
          from distutils.msvccompiler import get_build_version as get_build_msvc_version
      ModuleNotFoundError: No module named 'distutils.msvccompiler'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pastis
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pastis)

failed

CondaEnvException: Pip failed

Do you have any ideas how to resolve this?

Thanks!

pierrepo commented 1 month ago

Thanks @TobyBaril for reporting this issue. Unfortunately, I'm unable to reproduce this error. Could you please provide me with a couple of extra information such as:

Did you change any files after cloning this repo?