Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

GATK v4.0.8.1 conda set up error: Command "python setup.py egg_info" failed with error code 1

shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

When creating the gatk conda environment using conda env create -f gatkcondaenv.yml for GATK v4.0.8.1 on my Mac, I run into the following error.

...
Collecting pysam==0.13 (from -r /Applications/genomicstools/gatk/gatk-4.0.8.1/condaenv.E6OfWe.requirements.txt (line 17))
  Using cached https://files.pythonhosted.org/packages/31/17/31d317006a74941d2caddac97c5106601fe4da467653d0f061702e9ead95/pysam-0.13.tar.gz
    Complete output from command python setup.py egg_info:
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in `/private/var/folders/z0/s2h6193s3nb_75fsv36m5xldw34_0r/T/pip-build-_0t_kf9d/pysam/htslib':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in `/private/var/folders/z0/s2h6193s3nb_75fsv36m5xldw34_0r/T/pip-build-_0t_kf9d/pysam/htslib':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    # pysam: no cython available - using pre-compiled C
    # pysam: htslib mode is shared
    # pysam: HTSLIB_CONFIGURE_OPTIONS=None
    # pysam: htslib configure options: None
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/z0/s2h6193s3nb_75fsv36m5xldw34_0r/T/pip-build-_0t_kf9d/pysam/setup.py", line 220, in <module>
        htslib_make_options = run_make_print_config()
      File "/private/var/folders/z0/s2h6193s3nb_75fsv36m5xldw34_0r/T/pip-build-_0t_kf9d/pysam/setup.py", line 63, in run_make_print_config
        stdout = subprocess.check_output(["make", "-s", "print-config"])
      File "/Users/shlee/anaconda2/envs/gatk/lib/python3.6/subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "/Users/shlee/anaconda2/envs/gatk/lib/python3.6/subprocess.py", line 418, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['make', '-s', 'print-config']' returned non-zero exit status 1.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/z0/s2h6193s3nb_75fsv36m5xldw34_0r/T/pip-build-_0t_kf9d/pysam/

CondaValueError: pip returned an error

I've been successful in setting up the gatk conda environment for prior versions of GATK4. I recently updated my Mac to High Sierra.

Best Answer

  • shleeshlee Cambridge ✭✭✭✭✭
    edited September 2018 Accepted Answer

    I solved this with help from a developer. The relevant error line is:

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    

    If we ls /Library/Developer/CommandLineTools/usr/, I only see one item, share and no item bin.

    I updated my Mac's Xcode to v9.4.1, which is the latest from App Store. Then I installed Xcode Command Line Developer Tools with xcode-select --install. After this install, ls /Library/Developer/CommandLineTools/usr/ shows a bunch of folders including bin.

    Finally, I removed the previous erring install with rm -r /Users/shlee/anaconda2/envs/gatk and ran conda env create -f gatkcondaenv.yml within the GATK directory. We see the installation is successful because of the following message:

    #
    # To activate this environment, use:
    # > source activate gatk
    #
    # To deactivate an active environment, use:
    # > source deactivate
    #
    

    See this external article for some entertaining comments about the error.

Answers

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭
    edited September 2018 Accepted Answer

    I solved this with help from a developer. The relevant error line is:

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    

    If we ls /Library/Developer/CommandLineTools/usr/, I only see one item, share and no item bin.

    I updated my Mac's Xcode to v9.4.1, which is the latest from App Store. Then I installed Xcode Command Line Developer Tools with xcode-select --install. After this install, ls /Library/Developer/CommandLineTools/usr/ shows a bunch of folders including bin.

    Finally, I removed the previous erring install with rm -r /Users/shlee/anaconda2/envs/gatk and ran conda env create -f gatkcondaenv.yml within the GATK directory. We see the installation is successful because of the following message:

    #
    # To activate this environment, use:
    # > source activate gatk
    #
    # To deactivate an active environment, use:
    # > source deactivate
    #
    

    See this external article for some entertaining comments about the error.

Sign In or Register to comment.