conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
152 stars 177 forks source link

Failed to re-render with "ModuleNotFoundError: No module named 'libarchive'" #1200

Open phil-blain opened 4 years ago

phil-blain commented 4 years ago

Issue: I can't re-render git-feedstock, conda-smithy fails with ModuleNotFoundError: No module named 'libarchive':

$ conda smithy rerender -c auto
Traceback (most recent call last):
  File "/Users/Philippe/Logiciels/miniconda3/bin/conda-smithy", line 6, in <module>
    from conda_smithy.cli import main
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_smithy/cli.py", line 12, in <module>
    from conda_build.metadata import MetaData
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/metadata.py", line 23, in <module>
    from conda_build import exceptions, utils, variants, environ
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/utils.py", line 9, in <module>
    import libarchive
ModuleNotFoundError: No module named 'libarchive'


Environment (conda list):

``` $ conda list # packages in environment at /Users/Philippe/Logiciels/miniconda3: # # Name Version Build Channel beautifulsoup4 4.8.1 py37_0 conda-forge blinker 1.4 py_1 conda-forge bzip2 1.0.8 h01d97ff_1 conda-forge ca-certificates 2019.9.11 hecc5488_0 conda-forge certifi 2019.9.11 py37_0 conda-forge cffi 1.13.2 py37h33e799b_0 conda-forge chardet 3.0.4 py37_1003 conda-forge conda 4.7.12 py37_0 conda-forge conda-build 3.18.9 py37_1 conda-forge conda-forge-pinning 2019.11.26 0 conda-forge conda-package-handling 1.6.0 py37h0b31af3_1 conda-forge conda-smithy 3.6.2 py_1 conda-forge cryptography 2.8 py37hafa8578_0 conda-forge curl 7.65.3 h22ea746_0 conda-forge deprecated 1.2.7 py_0 conda-forge expat 2.2.5 h4a8c4bd_1004 conda-forge filelock 3.0.10 py_0 conda-forge gettext 0.19.8.1 h46ab8bc_1002 conda-forge git 2.23.0 pl526hbdf3604_2 conda-forge gitdb2 2.0.6 py_0 conda-forge gitpython 3.0.5 py_0 conda-forge glob2 0.7 py_0 conda-forge idna 2.8 py37_1000 conda-forge isodate 0.6.0 py_1 conda-forge jinja2 2.10.3 py_0 conda-forge krb5 1.16.3 hcfa6398_1001 conda-forge libcurl 7.65.3 h16faf7d_0 conda-forge libcxx 9.0.0 h89e68fa_1 conda-forge libedit 3.1.20170329 hcfe32e1_1001 conda-forge libffi 3.2.1 h6de7cb9_1006 conda-forge libiconv 1.15 h01d97ff_1005 conda-forge liblief 0.9.0 h2a1bed3_1 conda-forge libssh2 1.8.2 hcdc9a53_2 conda-forge markupsafe 1.1.1 py37h0b31af3_0 conda-forge msrest 0.6.10 py_0 conda-forge ncurses 6.1 h0a44026_1002 conda-forge oauthlib 3.0.1 py_0 conda-forge openssl 1.1.1d h0b31af3_0 conda-forge pcre 8.43 h4a8c4bd_0 conda-forge perl 5.26.2 haec8ef5_1006 conda-forge pip 19.3.1 py37_0 conda-forge pkginfo 1.5.0.1 py_0 conda-forge psutil 5.6.7 py37h0b31af3_0 conda-forge py-lief 0.9.0 py37h6d6d4d2_1 conda-forge pycosat 0.6.3 py37h0b31af3_1002 conda-forge pycparser 2.19 py37_1 conda-forge pycrypto 2.6.1 py37h0b31af3_1003 conda-forge pygithub 1.43.6 py37_0 conda-forge pyjwt 1.7.1 py_0 conda-forge pyopenssl 19.0.0 py37_0 conda-forge pysocks 1.7.1 py37_0 conda-forge python 3.7.3 h93065d6_1 conda-forge pytz 2019.3 py_0 conda-forge pyyaml 5.1.2 py37h0b31af3_0 conda-forge readline 8.0 hcfe32e1_0 conda-forge requests 2.22.0 py37_1 conda-forge requests-oauthlib 1.2.0 py_0 conda-forge ripgrep 11.0.2 h01d97ff_3 conda-forge ruamel.yaml 0.16.5 py37h0b31af3_1 conda-forge ruamel.yaml.clib 0.2.0 py37h0b31af3_0 conda-forge ruamel_yaml 0.15.71 py37h1de35cc_1000 conda-forge setuptools 42.0.1 py37_0 conda-forge six 1.13.0 py37_0 conda-forge smmap2 2.0.5 py_0 conda-forge soupsieve 1.9.4 py37_0 conda-forge sqlite 3.30.1 h93121df_0 conda-forge tk 8.6.10 hbbe82c9_0 conda-forge toolz 0.10.0 py_0 conda-forge tqdm 4.39.0 py_0 conda-forge urllib3 1.25.7 py37_0 conda-forge vsts-python-api 0.1.22 py_0 conda-forge wheel 0.33.6 py37_0 conda-forge wrapt 1.11.2 py37h0b31af3_0 conda-forge xz 5.2.4 h1de35cc_1001 conda-forge yaml 0.1.7 h1de35cc_1001 conda-forge zlib 1.2.11 h0b31af3_1006 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : base active env location : /Users/Philippe/Logiciels/miniconda3 shell level : 1 user config file : /Users/Philippe/.condarc populated config files : /Users/Philippe/.condarc conda version : 4.7.12 conda-build version : 3.18.9 python version : 3.7.3.final.0 virtual packages : base environment : /Users/Philippe/Logiciels/miniconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/Philippe/Logiciels/miniconda3/pkgs /Users/Philippe/.conda/pkgs envs directories : /Users/Philippe/Logiciels/miniconda3/envs /Users/Philippe/.conda/envs platform : osx-64 user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.3 Darwin/15.6.0 OSX/10.11.6 UID:GID : 502:20 netrc file : None offline mode : False ```

Backstory: First the bot failed to re-render. Then I tried to re-render locally and got this error: RuntimeError: conda-smithy version in root env (3.4.1) is out-of-date (3.6.2). Exiting. So next I did conda update conda-smithy, which resulted in a whole lot of packages being upgraded (but not libarchive), some removed (including libarchive-3.3.3-h5c473cc_1006 and python-libarchive-c-2.8-py37_1004) and 3 downgraded:

~~~ Collecting package metadata (current_repodata.json): done Solving environment: done WARNING conda.core.package_cache_data:_make_single_record(350): Encountered corrupt package tarball at /Users/Philippe/Logiciels/miniconda3/pkgs/git-2.18.0-0.tar.bz2. Conda has removed it, but you need to re-run conda to download it again. ## Package Plan ## environment location: /Users/Philippe/Logiciels/miniconda3 added / updated specs: - conda-smithy The following packages will be downloaded: package | build ---------------------------|----------------- beautifulsoup4-4.8.1 | py37_0 149 KB conda-forge bzip2-1.0.8 | h01d97ff_1 148 KB conda-forge certifi-2019.9.11 | py37_0 147 KB conda-forge cffi-1.13.2 | py37h33e799b_0 213 KB conda-forge conda-4.7.12 | py37_0 3.0 MB conda-forge conda-forge-pinning-2019.11.26| 0 7 KB conda-forge conda-package-handling-1.6.0| py37h0b31af3_1 1.5 MB conda-forge conda-smithy-3.6.2 | py_1 55 KB conda-forge cryptography-2.8 | py37hafa8578_0 578 KB conda-forge deprecated-1.2.7 | py_0 10 KB conda-forge expat-2.2.5 | h4a8c4bd_1004 127 KB conda-forge gitdb2-2.0.6 | py_0 46 KB conda-forge gitpython-3.0.5 | py_0 346 KB conda-forge jinja2-2.10.3 | py_0 91 KB conda-forge markupsafe-1.1.1 | py37h0b31af3_0 25 KB conda-forge msrest-0.6.10 | py_0 47 KB conda-forge openssl-1.1.1d | h0b31af3_0 1.9 MB conda-forge pcre-8.43 | h4a8c4bd_0 222 KB conda-forge pip-19.3.1 | py37_0 1.9 MB conda-forge psutil-5.6.7 | py37h0b31af3_0 330 KB conda-forge pycosat-0.6.3 |py37h0b31af3_1002 110 KB conda-forge pycrypto-2.6.1 |py37h0b31af3_1003 475 KB conda-forge pysocks-1.7.1 | py37_0 27 KB conda-forge pytz-2019.3 | py_0 237 KB conda-forge pyyaml-5.1.2 | py37h0b31af3_0 172 KB conda-forge ripgrep-11.0.2 | h01d97ff_3 1.6 MB conda-forge ruamel.yaml-0.16.5 | py37h0b31af3_1 165 KB conda-forge ruamel.yaml.clib-0.2.0 | py37h0b31af3_0 138 KB conda-forge setuptools-42.0.1 | py37_0 638 KB conda-forge six-1.13.0 | py37_0 22 KB conda-forge soupsieve-1.9.4 | py37_0 57 KB conda-forge sqlite-3.30.1 | h93121df_0 2.5 MB conda-forge tk-8.6.10 | hbbe82c9_0 3.3 MB conda-forge tqdm-4.39.0 | py_0 43 KB conda-forge urllib3-1.25.7 | py37_0 159 KB conda-forge wheel-0.33.6 | py37_0 35 KB conda-forge wrapt-1.11.2 | py37h0b31af3_0 41 KB conda-forge ------------------------------------------------------------ Total: 20.4 MB The following NEW packages will be INSTALLED: pcre conda-forge/osx-64::pcre-8.43-h4a8c4bd_0 ruamel.yaml.clib conda-forge/osx-64::ruamel.yaml.clib-0.2.0-py37h0b31af3_0 The following packages will be REMOVED: asn1crypto-0.24.0-py37_1003 icu-64.2-h6de7cb9_0 libarchive-3.3.3-h5c473cc_1006 libcxxabi-8.0.0-4 libxml2-2.9.9-h12c6b28_2 lz4-c-1.8.3-h6de7cb9_1001 lzo-2.10-h1de35cc_1000 python-libarchive-c-2.8-py37_1004 python.app-1.2-py37h1de35cc_1200 ruamel-1.0-py37_0 zstd-1.4.0-ha9f0a20_0 The following packages will be UPDATED: beautifulsoup4 4.8.0-py37_0 --> 4.8.1-py37_0 bzip2 1.0.8-h01d97ff_0 --> 1.0.8-h01d97ff_1 ca-certificates 2019.6.16-hecc5488_0 --> 2019.9.11-hecc5488_0 certifi 2019.6.16-py37_1 --> 2019.9.11-py37_0 cffi 1.12.3-py37hccf1714_0 --> 1.13.2-py37h33e799b_0 conda 4.7.10-py37_0 --> 4.7.12-py37_0 conda-forge-pinni~ 2019.07.26-0 --> 2019.11.26-0 conda-package-han~ 1.4.1-py37_0 --> 1.6.0-py37h0b31af3_1 conda-smithy 3.4.1-py_1 --> 3.6.2-py_1 cryptography 2.7-py37h212c5bf_0 --> 2.8-py37hafa8578_0 deprecated 1.2.6-py_0 --> 1.2.7-py_0 expat 2.2.5-h6de7cb9_1003 --> 2.2.5-h4a8c4bd_1004 git 2.22.0-pl526hbdf3604_0 --> 2.23.0-pl526hbdf3604_2 gitdb2 2.0.5-py_0 --> 2.0.6-py_0 gitpython 2.1.13-py_0 --> 3.0.5-py_0 jinja2 2.10.1-py_0 --> 2.10.3-py_0 libcxx 8.0.0-4 --> 9.0.0-h89e68fa_1 msrest 0.6.9-py_0 --> 0.6.10-py_0 openssl 1.1.1c-h01d97ff_0 --> 1.1.1d-h0b31af3_0 pip 19.2.1-py37_0 --> 19.3.1-py37_0 psutil 5.6.3-py37h01d97ff_0 --> 5.6.7-py37h0b31af3_0 pycosat 0.6.3-py37h1de35cc_1001 --> 0.6.3-py37h0b31af3_1002 pycrypto 2.6.1-py37h1de35cc_1002 --> 2.6.1-py37h0b31af3_1003 pysocks 1.7.0-py37_0 --> 1.7.1-py37_0 pytz 2019.2-py_0 --> 2019.3-py_0 ripgrep 11.0.2-0 --> 11.0.2-h01d97ff_3 ruamel.yaml 0.16.0-py37h01d97ff_0 --> 0.16.5-py37h0b31af3_1 setuptools 41.0.1-py37_0 --> 42.0.1-py37_0 six 1.12.0-py37_1000 --> 1.13.0-py37_0 soupsieve 1.9.2-py37_0 --> 1.9.4-py37_0 sqlite 3.29.0-hb7d70f7_0 --> 3.30.1-h93121df_0 tk 8.6.9-h2573ce8_1002 --> 8.6.10-hbbe82c9_0 tqdm 4.32.2-py_0 --> 4.39.0-py_0 urllib3 1.25.3-py37_0 --> 1.25.7-py37_0 wheel 0.33.4-py37_0 --> 0.33.6-py37_0 zlib 1.2.11-h01d97ff_1005 --> 1.2.11-h0b31af3_1006 The following packages will be DOWNGRADED: markupsafe 1.1.1-py37h1de35cc_0 --> 1.1.1-py37h0b31af3_0 pyyaml 5.1.2-py37h01d97ff_0 --> 5.1.2-py37h0b31af3_0 wrapt 1.11.2-py37h01d97ff_0 --> 1.11.2-py37h0b31af3_0 Proceed ([y]/n)? y Downloading and Extracting Packages cffi-1.13.2 | 213 KB | ########################################################################################################### | 100% setuptools-42.0.1 | 638 KB | ########################################################################################################### | 100% conda-package-handli | 1.5 MB | ########################################################################################################### | 100% conda-smithy-3.6.2 | 55 KB | ########################################################################################################### | 100% pip-19.3.1 | 1.9 MB | ########################################################################################################### | 100% pysocks-1.7.1 | 27 KB | ########################################################################################################### | 100% msrest-0.6.10 | 47 KB | ########################################################################################################### | 100% certifi-2019.9.11 | 147 KB | ########################################################################################################### | 100% pycrypto-2.6.1 | 475 KB | ########################################################################################################### | 100% jinja2-2.10.3 | 91 KB | ########################################################################################################### | 100% tk-8.6.10 | 3.3 MB | ########################################################################################################### | 100% pytz-2019.3 | 237 KB | ########################################################################################################### | 100% wheel-0.33.6 | 35 KB | ########################################################################################################### | 100% pcre-8.43 | 222 KB | ########################################################################################################### | 100% expat-2.2.5 | 127 KB | ########################################################################################################### | 100% pycosat-0.6.3 | 110 KB | ########################################################################################################### | 100% bzip2-1.0.8 | 148 KB | ########################################################################################################### | 100% gitpython-3.0.5 | 346 KB | ########################################################################################################### | 100% cryptography-2.8 | 578 KB | ########################################################################################################### | 100% pyyaml-5.1.2 | 172 KB | ########################################################################################################### | 100% ripgrep-11.0.2 | 1.6 MB | ########################################################################################################### | 100% openssl-1.1.1d | 1.9 MB | ########################################################################################################### | 100% markupsafe-1.1.1 | 25 KB | ########################################################################################################### | 100% ruamel.yaml.clib-0.2 | 138 KB | ########################################################################################################### | 100% wrapt-1.11.2 | 41 KB | ########################################################################################################### | 100% ruamel.yaml-0.16.5 | 165 KB | ########################################################################################################### | 100% urllib3-1.25.7 | 159 KB | ########################################################################################################### | 100% deprecated-1.2.7 | 10 KB | ########################################################################################################### | 100% soupsieve-1.9.4 | 57 KB | ########################################################################################################### | 100% tqdm-4.39.0 | 43 KB | ########################################################################################################### | 100% sqlite-3.30.1 | 2.5 MB | ########################################################################################################### | 100% six-1.13.0 | 22 KB | ########################################################################################################### | 100% gitdb2-2.0.6 | 46 KB | ########################################################################################################### | 100% conda-4.7.12 | 3.0 MB | ########################################################################################################### | 100% psutil-5.6.7 | 330 KB | ########################################################################################################### | 100% conda-forge-pinning- | 7 KB | ########################################################################################################### | 100% beautifulsoup4-4.8.1 | 149 KB | ########################################################################################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done ~~~

After that I re-run conda smithy rerender -c auto and got the libarchive error above. The same error happens on a simple conda-smithy --version or conda smithy --version.

phil-blain commented 4 years ago

More info:

I created a new environment with just conda-smithy:

conda create -n conda-smithy
conda activate conda-smithy
conda install conda-smithy

Result (notice libarchive is there):

~~~ Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /Users/Philippe/Logiciels/miniconda3/envs/conda-smithy added / updated specs: - conda-smithy The following packages will be downloaded: package | build ---------------------------|----------------- conda-build-3.18.11 | py37_0 511 KB conda-forge libarchive-3.3.3 | h8912c15_1007 1.5 MB conda-forge libxml2-2.9.10 | h53d96d6_0 1.2 MB conda-forge python-libarchive-c-2.9 | py37_0 54 KB conda-forge zstd-1.4.4 | he7fca8b_1 1.0 MB conda-forge ------------------------------------------------------------ Total: 4.3 MB The following NEW packages will be INSTALLED: beautifulsoup4 conda-forge/osx-64::beautifulsoup4-4.8.1-py37_0 blinker conda-forge/noarch::blinker-1.4-py_1 bzip2 conda-forge/osx-64::bzip2-1.0.8-h01d97ff_1 ca-certificates conda-forge/osx-64::ca-certificates-2019.9.11-hecc5488_0 certifi conda-forge/osx-64::certifi-2019.9.11-py37_0 cffi conda-forge/osx-64::cffi-1.13.2-py37h33e799b_0 chardet conda-forge/osx-64::chardet-3.0.4-py37_1003 conda conda-forge/osx-64::conda-4.7.12-py37_0 conda-build conda-forge/osx-64::conda-build-3.18.11-py37_0 conda-forge-pinni~ conda-forge/noarch::conda-forge-pinning-2019.11.26-0 conda-package-han~ conda-forge/osx-64::conda-package-handling-1.6.0-py37h0b31af3_1 conda-smithy conda-forge/noarch::conda-smithy-3.6.2-py_1 cryptography conda-forge/osx-64::cryptography-2.8-py37hafa8578_0 curl conda-forge/osx-64::curl-7.65.3-h22ea746_0 deprecated conda-forge/noarch::deprecated-1.2.7-py_0 expat conda-forge/osx-64::expat-2.2.5-h4a8c4bd_1004 filelock conda-forge/noarch::filelock-3.0.10-py_0 gettext conda-forge/osx-64::gettext-0.19.8.1-h46ab8bc_1002 git conda-forge/osx-64::git-2.23.0-pl526hbdf3604_2 gitdb2 conda-forge/noarch::gitdb2-2.0.6-py_0 gitpython conda-forge/noarch::gitpython-3.0.5-py_0 glob2 conda-forge/noarch::glob2-0.7-py_0 icu conda-forge/osx-64::icu-64.2-h6de7cb9_1 idna conda-forge/osx-64::idna-2.8-py37_1000 isodate conda-forge/noarch::isodate-0.6.0-py_1 jinja2 conda-forge/noarch::jinja2-2.10.3-py_0 krb5 conda-forge/osx-64::krb5-1.16.3-hcfa6398_1001 libarchive conda-forge/osx-64::libarchive-3.3.3-h8912c15_1007 libcurl conda-forge/osx-64::libcurl-7.65.3-h16faf7d_0 libcxx conda-forge/osx-64::libcxx-9.0.0-h89e68fa_1 libedit conda-forge/osx-64::libedit-3.1.20170329-hcfe32e1_1001 libffi conda-forge/osx-64::libffi-3.2.1-h6de7cb9_1006 libiconv conda-forge/osx-64::libiconv-1.15-h01d97ff_1005 liblief conda-forge/osx-64::liblief-0.9.0-h2a1bed3_1 libssh2 conda-forge/osx-64::libssh2-1.8.2-hcdc9a53_2 libxml2 conda-forge/osx-64::libxml2-2.9.10-h53d96d6_0 lz4-c conda-forge/osx-64::lz4-c-1.8.3-h6de7cb9_1001 lzo conda-forge/osx-64::lzo-2.10-h1de35cc_1000 markupsafe conda-forge/osx-64::markupsafe-1.1.1-py37h0b31af3_0 msrest conda-forge/noarch::msrest-0.6.10-py_0 ncurses conda-forge/osx-64::ncurses-6.1-h0a44026_1002 oauthlib conda-forge/noarch::oauthlib-3.0.1-py_0 openssl conda-forge/osx-64::openssl-1.1.1d-h0b31af3_0 pcre conda-forge/osx-64::pcre-8.43-h4a8c4bd_0 perl conda-forge/osx-64::perl-5.26.2-haec8ef5_1006 pip conda-forge/osx-64::pip-19.3.1-py37_0 pkginfo conda-forge/noarch::pkginfo-1.5.0.1-py_0 psutil conda-forge/osx-64::psutil-5.6.7-py37h0b31af3_0 py-lief conda-forge/osx-64::py-lief-0.9.0-py37h6d6d4d2_1 pycosat conda-forge/osx-64::pycosat-0.6.3-py37h0b31af3_1002 pycparser conda-forge/osx-64::pycparser-2.19-py37_1 pycrypto conda-forge/osx-64::pycrypto-2.6.1-py37h0b31af3_1003 pygithub conda-forge/osx-64::pygithub-1.43.6-py37_0 pyjwt conda-forge/noarch::pyjwt-1.7.1-py_0 pyopenssl conda-forge/osx-64::pyopenssl-19.0.0-py37_0 pysocks conda-forge/osx-64::pysocks-1.7.1-py37_0 python conda-forge/osx-64::python-3.7.3-h93065d6_1 python-libarchive~ conda-forge/osx-64::python-libarchive-c-2.9-py37_0 pytz conda-forge/noarch::pytz-2019.3-py_0 pyyaml conda-forge/osx-64::pyyaml-5.1.2-py37h0b31af3_0 readline conda-forge/osx-64::readline-8.0-hcfe32e1_0 requests conda-forge/osx-64::requests-2.22.0-py37_1 requests-oauthlib conda-forge/noarch::requests-oauthlib-1.2.0-py_0 ripgrep conda-forge/osx-64::ripgrep-11.0.2-h01d97ff_3 ruamel.yaml conda-forge/osx-64::ruamel.yaml-0.16.5-py37h0b31af3_1 ruamel.yaml.clib conda-forge/osx-64::ruamel.yaml.clib-0.2.0-py37h0b31af3_0 ruamel_yaml conda-forge/osx-64::ruamel_yaml-0.15.71-py37h1de35cc_1000 setuptools conda-forge/osx-64::setuptools-42.0.1-py37_0 six conda-forge/osx-64::six-1.13.0-py37_0 smmap2 conda-forge/noarch::smmap2-2.0.5-py_0 soupsieve conda-forge/osx-64::soupsieve-1.9.4-py37_0 sqlite conda-forge/osx-64::sqlite-3.30.1-h93121df_0 tk conda-forge/osx-64::tk-8.6.10-hbbe82c9_0 toolz conda-forge/noarch::toolz-0.10.0-py_0 tqdm conda-forge/noarch::tqdm-4.39.0-py_0 urllib3 conda-forge/osx-64::urllib3-1.25.7-py37_0 vsts-python-api conda-forge/noarch::vsts-python-api-0.1.22-py_0 wheel conda-forge/osx-64::wheel-0.33.6-py37_0 wrapt conda-forge/osx-64::wrapt-1.11.2-py37h0b31af3_0 xz conda-forge/osx-64::xz-5.2.4-h1de35cc_1001 yaml conda-forge/osx-64::yaml-0.1.7-h1de35cc_1001 zlib conda-forge/osx-64::zlib-1.2.11-h0b31af3_1006 zstd conda-forge/osx-64::zstd-1.4.4-he7fca8b_1 Proceed ([y]/n)? y Downloading and Extracting Packages zstd-1.4.4 | 1.0 MB | ########################################################################################################### | 100% python-libarchive-c- | 54 KB | ########################################################################################################### | 100% libarchive-3.3.3 | 1.5 MB | ########################################################################################################### | 100% libxml2-2.9.10 | 1.2 MB | ########################################################################################################### | 100% conda-build-3.18.11 | 511 KB | ########################################################################################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done ~~~

After I activate this new environment the error still appears:

$ conda --version
conda 4.7.12
$ conda-build --version
conda-build 3.18.11
$ conda-smithy --version
3.6.2
$ conda smithy --version # brace yourself
Traceback (most recent call last):
  File "/Users/Philippe/Logiciels/miniconda3/bin/conda-smithy", line 6, in <module>
    from conda_smithy.cli import main
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_smithy/cli.py", line 12, in <module>
    from conda_build.metadata import MetaData
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/metadata.py", line 23, in <module>
    from conda_build import exceptions, utils, variants, environ
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/utils.py", line 9, in <module>
    import libarchive
ModuleNotFoundError: No module named 'libarchive'
$ conda build --version
Traceback (most recent call last):
  File "/Users/Philippe/Logiciels/miniconda3/bin/conda-build", line 7, in <module>
    from conda_build.cli.main_build import main
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 18, in <module>
    import conda_build.api as api
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/api.py", line 22, in <module>
    from conda_build.config import (Config, get_or_merge_config, get_channel_urls,
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/config.py", line 17, in <module>
    from .variants import get_default_variant
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/variants.py", line 15, in <module>
    from conda_build.utils import ensure_list, trim_empty_keys, get_logger
  File "/Users/Philippe/Logiciels/miniconda3/lib/python3.7/site-packages/conda_build/utils.py", line 9, in <module>
    import libarchive
ModuleNotFoundError: No module named 'libarchive'
$ python -c "import libarchive"
# this works without error !!
phil-blain commented 4 years ago

So it appears this is not specific to conda-smithy : https://github.com/conda/conda/issues/8920 https://github.com/ContinuumIO/anaconda-issues/issues/11104 https://github.com/conda/conda/issues/8972

phil-blain commented 4 years ago

I also tried to recreate my base environment in a new env, and installing libarchive there:

conda activate base
conda list --explicit > spec-file.txt
conda create --name base-broken-test --file spec-file.txt
conda activate base-broken-test
conda install libarchive 
conda install python-libarchive-c

Result after these commands is same as above with my "conda-smithy" environment :

python -c 'import libarchive'  # works
conda smithy --version  # fails
conda-smithy --version  # works
conda build --version   # fails
conda-build --version   # works