conda / conda-build

Commands and tools for building conda packages
https://docs.conda.io/projects/conda-build/
Other
383 stars 423 forks source link

numpy-1.14.2 build error #2795

Closed nick-youngblut closed 2 years ago

nick-youngblut commented 6 years ago

I'm trying to create a conda package for nanopack. I'm runing conda skeleton pypi nanopack --recursive and getting the following error:

# many lines of output...
Applying patch: '/tmp/tmpw692xrc4conda_skeleton_numpy-1.14.2.zip/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 167 with fuzz 2 (offset 1 line).
Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:

  - `pip install .`       (from a git repo or downloaded source
                           release)
  - `pip install numpy`   (last NumPy release on PyPi)

Traceback (most recent call last):
  File "setup.py", line 394, in <module>
    setup_package()
  File "setup.py", line 386, in setup_package
    setup(**metadata)
  File "/tmp/tmpw692xrc4conda_skeleton_numpy-1.14.2.zip/numpy-1.14.2/numpy/distutils/core.py", line 130, in setup
    if dist.help or not _command_line_ok():
AttributeError: 'NoneType' object has no attribute 'help'
$PYTHONPATH = /tmp/tmpw692xrc4conda_skeleton_numpy-1.14.2.zip/numpy-1.14.2

Leaving build/test directories:
  Work:  /ebio/abt3_projects/software/dev/miniconda3_dev/conda-bld/skeleton_1522480590389/work
  Test:  /ebio/abt3_projects/software/dev/miniconda3_dev/conda-bld/skeleton_1522480590389/test_tmp
Leaving build/test environments:
  Test: source activate  /ebio/abt3_projects/software/dev/miniconda3_dev/conda-bld/skeleton_1522480590389/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac
  Build:    source activate  /ebio/abt3_projects/software/dev/miniconda3_dev/conda-bld/skeleton_1522480590389/_build_env

Error: command failed: /ebio/abt3_projects/software/dev/miniconda3_dev/conda-bld/skeleton_1522480590389/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/python setup.py install

Is there anything that I can do about the AttributeError: 'NoneType' object has no attribute 'help'?

$ conda info

     active environment : R_pkg_build
    active env location : /ebio/abt3_projects/software/dev/miniconda3_dev/envs/R_pkg_build
            shell level : 1
       user config file : /ebio/abt3/nyoungblut/.condarc
 populated config files : /ebio/abt3_projects/software/dev/miniconda3_dev/.condarc
                          /ebio/abt3/nyoungblut/.condarc
          conda version : 4.5.0
    conda-build version : 3.7.2
         python version : 3.6.4.final.0
       base environment : /ebio/abt3_projects/software/dev/miniconda3_dev  (writable)
           channel URLs : https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://conda.anaconda.org/r/linux-64
                          https://conda.anaconda.org/r/noarch
                          https://conda.anaconda.org/qiime2/linux-64
                          https://conda.anaconda.org/qiime2/noarch
          package cache : /ebio/abt3_projects/software/dev/miniconda3_dev/pkgs
                          /ebio/abt3/nyoungblut/.conda/pkgs
       envs directories : /ebio/abt3_projects/software/dev/miniconda3_dev/envs
                          /ebio/abt3/nyoungblut/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.0 requests/2.18.4 CPython/3.6.4 Linux/4.4.67 ubuntu/16.04 glibc/2.23
                UID:GID : 6354:350
             netrc file : None
           offline mode : False
msarahan commented 6 years ago

--recursive is finding that it needs to build numpy somehow. You should really never build numpy. It looks like nanomath is the one responsible:

Preparing transaction: ...working... done
Executing transaction: ...working... done
Applying patch: '/var/folders/94/cb44zrcj06n_vj5zgxvjpb0h0000gp/T/tmp4xyhtdw2conda_skeleton_nanomath-0.21.0.tar.gz/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 168 with fuzz 2 (offset 1 line).
Warning, the following versions were found for numpy

I don't understand why it's recursing into building numpy, and that's a bug, but unfortunately not a very high priority one. I advise you to ctrl-c it to prevent it from trying to build numpy, and take the recipes you have already obtained. If you need others, re-attempt the recursive build down below nanomath in the chain.

rodgomesc commented 6 years ago

same error for me in numpy-1.14.3

msarahan commented 6 years ago

@rodgomesc if you are trying to build numpy itself, you need a different recipe. You absolutely will not succeed with the skeleton generator for numpy. It is a much more complicated beast.

msarahan commented 6 years ago

You should make a compiler paçkage that points to your android SDK, then use the recipe that we already have for numpy. Installing to android/$ARCH is kind of an antipattern with conda. Any single env should be self-consistent in the programs and libraries it has installed (with the exception of compiler packages that target foreign architectures.

More in the docs at https://conda.io/docs/user-guide/tasks/build-packages/compiler-tools.html

and example recipe at https://github.com/AnacondaRecipes/aggregate/tree/master/ctng-compilers-activation-feedstock/recipe

github-actions[bot] commented 2 years ago

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!