Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda skeleton pypi numpy does not work #76

Closed
asmeurer opened this issue Mar 24, 2014 · 16 comments
Closed

conda skeleton pypi numpy does not work #76

asmeurer opened this issue Mar 24, 2014 · 16 comments
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@asmeurer
Copy link
Contributor

$conda skeleton pypi numpy
More than one source version is available for numpy:
0: https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.tar.gz (3.6 MB)
1: https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.zip (4.1 MB)
Which version should I use? 0
Using url https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.tar.gz (3779617) for numpy.
Traceback (most recent call last):
  File "/Users/aaronmeurer/anaconda/bin/conda-skeleton", line 7, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/bin/conda-skeleton", line 5, in <module>
    sys.exit(main())
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/main_skeleton.py", line 111, in main
    args.func(args, p)
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/main_skeleton.py", line 119, in execute
    pypi.main(args, parser)
  File "/Users/aaronmeurer/Documents/Continuum/conda-build/conda_build/pypi.py", line 232, in main
    if data.has_key('classifiers'):
AttributeError: 'dict' object has no attribute 'has_key'
@asmeurer
Copy link
Contributor Author

Fixed that problem. The real issue is this

$conda skeleton pypi numpy
More than one source version is available for numpy:
0: https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.tar.gz (3.6 MB)
1: https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.zip (4.1 MB)
Which version should I use? 0
Using url https://pypi.python.org/packages/source/n/numpy/numpy-1.8.0.tar.gz (3779617) for numpy.
This is the license for numpy

BSD

What license string should I use? BSD
Downloading numpy (use --no-download to skip this step)
Using cached download
Unpacking numpy...
done
working in /var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T/tmp30makxconda_skeleton
Running from numpy source directory.
Traceback (most recent call last):
  File "setup.py", line 217, in <module>
    setup_package()
  File "setup.py", line 210, in setup_package
    configuration=configuration )
  File "/private/var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T/tmp30makxconda_skeleton/numpy-1.8.0/numpy/distutils/core.py", line 130, in setup
    if dist.help or not _command_line_ok():
AttributeError: 'NoneType' object has no attribute 'help'
$PYTHONPATH = /var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T/tmp30makxconda_skeleton/numpy-1.8.0
Error: command failed: /Users/aaronmeurer/anaconda/bin/python setup.py install

asmeurer added a commit that referenced this issue Mar 24, 2014
@AnneTheAgile
Copy link

Update; My problem was user error. I'm keeping the comment so I can navigate between my hints :). 2014-05-04Sun.19:51:06

Is this the same as my error , I couldn't the numpy version to change? http://stackoverflow.com/questions/23458593/conda-example-does-not-work-it-shows-newer-not-older-numpy

This was part of my long saga of trials, see #100 Cannot access specific Binstar version.
//AnneTheAgile

@asmeurer
Copy link
Contributor Author

asmeurer commented May 5, 2014

The issue is that we patch distutils, but numpy has its own distutils, which expects the real distutils to work.

@astrojuanlu
Copy link

Got bitten by this today, trying to build a package which uses numpy.distutils. Any possible workaround?

@asmeurer
Copy link
Contributor Author

Packages that use numpy.distutils generally work. Which package were you trying to build?

@astrojuanlu
Copy link

This one specifically (v0.2.0):

http://github.com/Pybonacci/poliastro

In the end it was a minor problem, I just wrote the meta.yaml by hand.
On Dec 27, 2014 9:43 PM, "Aaron Meurer" notifications@github.com wrote:

Packages that use numpy.distutils generally work. Which package were you
trying to build?

Reply to this email directly or view it on GitHub
#76 (comment).

@asmeurer
Copy link
Contributor Author

I see. We may have to patch numpy.distutils as well. Or maybe there is a simpler workaround.

@ozancaglayan
Copy link

I intended to create a NumPy package compiled against OpenBLAS and ran this command which failed the same way. This is a Miniconda3 installation. The strange thing is that this exception, once encountered, breaks my IPython:

Traceback (most recent call last):
  File "/home/ozan/miniconda3/bin/ipython", line 6, in <module>
    sys.exit(start_ipython())
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/__init__.py", line 120, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/config/application.py", line 563, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/config/application.py", line 92, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 332, in initialize
    self.init_shell()
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 348, in init_shell
    ipython_dir=self.ipython_dir, user_ns=self.user_ns)
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/config/configurable.py", line 354, in instance
    inst = cls(*args, **kwargs)
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/terminal/interactiveshell.py", line 328, in __init__
    **kwargs
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 483, in __init__
    self.init_readline()
  File "/home/ozan/miniconda3/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 1843, in init_readline
    self.readline_startup_hook = readline.set_startup_hook
AttributeError: 'module' object has no attribute 'set_startup_hook'

Any clues?

@ozancaglayan
Copy link

Hmm removing conda-bld folder fixed my ipython back.

@ozancaglayan
Copy link

Pff, actually it was caused because I was in conda-recipes folder which also includes an ipython folder. I hate this import caused non-intuitive Python exceptions :)

@stoiver
Copy link

stoiver commented Feb 18, 2015

Same problems as Juanlu001 when using numpy.distutils.

Specific conda command:

conda skeleton pypi anuga

Package http://github.com/stoiver/anuga_core

My setup.py is quite similar to the one used by Juanlu001 in the package http://github.com/Pybonacci/poliastro

Here is the error

(anuga_clean)steve@bottineau:~/Sandpit$ conda skeleton pypi anuga
Using url https://pypi.python.org/packages/source/a/anuga/anuga-1.3.8.tar.gz (12.4 MB) for anuga.
Downloading anuga (use --no-download to skip this step)
Using cached download
Unpacking anuga...
done
working in /tmp/tmpelPQqqconda_skeleton_anuga-1.3.8.tar.gz
Fetching package metadata: ......
Solving package specifications: .
Applying patch: '/tmp/tmpelPQqqconda_skeleton_anuga-1.3.8.tar.gz/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 168 with fuzz 2 (offset 2 lines).
Running from anuga source directory.
Traceback (most recent call last):
  File "setup.py", line 184, in <module>
    setup_package()
  File "setup.py", line 178, in setup_package
    setup(**metadata)
  File "/home/steve/miniconda/envs/_build/lib/python2.7/site-packages/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/tmpelPQqqconda_skeleton_anuga-1.3.8.tar.gz/anuga-1.3.8
Error: command failed: /home/steve/miniconda/envs/_build/bin/python setup.py install

@timcera
Copy link

timcera commented May 13, 2015

Any work-around or fix?

Have the same problem with

conda skeleton pypi openopt

@dtsmith2001
Copy link

I am not able to run

conda skeleton pypi scikit-learn

either. This issue was reported in May 2014. I haven't been able to find a work-around after doing numerous searches. Is there indeed a work-around or fix?

I am using Anaconda 3 version 2.2.0 with scikit-learn 0.16.1. I did a fresh installation of Anaconda and followed the recipe in http://conda.pydata.org/docs/build_tutorials/pkgs.html to build pyinstrument. Building pandas with

conda skeleton pypi pandas

worked just fine. It's scikit-learn that has a problem. I am running Windows 7 x64.

I finally got a working version on my non-networked box by using

conda update scikit-learn

on my networked box and then copying the Lib\site-package\sklearn + egg file over to the other box.

@rmax
Copy link
Contributor

rmax commented Nov 3, 2015

I just got the same issue as @dtsmith2001 with scikit-learn. I had to write manually a recipe for scikit-learn because I needed the package compatible with numpy=1.6, which was not a big deal.

In OSX:

$ conda skeleton pypi scikit-learn
Warning, the following versions were found for scikit-learn
0.17b1
0.16.1
0.16.0
0.16b1
0.15.2
0.15.1
0.15.0
0.15.0b2
0.15.0b1
0.14.1
0.14
0.14a1
0.13.1
0.13
0.12.1
0.12
0.11
0.10
0.9
Using 0.17b1
Use --version to specify a different version.
Using url https://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.17b1.tar.gz (7.5 MB) for scikit-learn.
Downloading scikit-learn
Using cached download
Unpacking scikit-learn...
done
working in /var/folders/55/nbg15c6j4k3cg06tjfhqypd40000gn/T/tmpf5347bconda_skeleton_scikit-learn-0.17b1.tar.gz
Fetching package metadata: ..........
Solving package specifications: ...............
The following NEW packages will be INSTALLED:

    pyyaml: 3.11-py27_1   defaults
    yaml:   0.1.6-0       defaults

The following packages will be UPDATED:

    numpy:  1.6.2-py27_4 defaults --> 1.10.1-py27_0 defaults

Unlinking packages ...
[      COMPLETE      ]|###################################################| 100%
Linking packages ...
[      COMPLETE      ]|###################################################| 100%
Applying patch: '/var/folders/55/nbg15c6j4k3cg06tjfhqypd40000gn/T/tmpf5347bconda_skeleton_scikit-learn-0.17b1.tar.gz/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 169 with fuzz 2 (offset 2 lines).
Partial import of sklearn during the build process.
Traceback (most recent call last):
  File "setup.py", line 247, in <module>
    setup_package()
  File "setup.py", line 243, in setup_package
    setup(**metadata)
  File "/Users/rolando/miniconda/envs/_build/lib/python2.7/site-packages/numpy/distutils/core.py", line 130, in setup
    if dist.help or not _command_line_ok():
AttributeError: 'NoneType' object has no attribute 'help'
$PYTHONPATH = /var/folders/55/nbg15c6j4k3cg06tjfhqypd40000gn/T/tmpf5347bconda_skeleton_scikit-learn-0.17b1.tar.gz/scikit-learn-0.17b1
Error: command failed: /Users/rolando/miniconda/envs/_build/bin/python setup.py install

$ conda info
Current conda install:

             platform : osx-64
        conda version : 3.18.3
  conda-build version : 1.18.1
       python version : 2.7.10.final.0
     requests version : 2.7.0

In Linux:

$ conda skeleton pypi scikit-learn
Warning, the following versions were found for scikit-learn
0.17b1
0.16.1
0.16.0
0.16b1
0.15.2
0.15.1
0.15.0
0.15.0b2
0.15.0b1
0.14.1
0.14
0.14a1
0.13.1
0.13
0.12.1
0.12
0.11
0.10
0.9
Using 0.17b1
Use --version to specify a different version.
Using url https://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0.17b1.tar.gz (7.5 MB) for scikit-learn.
Downloading scikit-learn
Using cached download
Unpacking scikit-learn...
done
working in /tmp/tmp4Ngct2conda_skeleton_scikit-learn-0.17b1.tar.gz
Fetching package metadata: ......
Solving package specifications: .................
Applying patch: '/tmp/tmp4Ngct2conda_skeleton_scikit-learn-0.17b1.tar.gz/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 168 with fuzz 2 (offset 2 lines).
Partial import of sklearn during the build process.
Traceback (most recent call last):
  File "setup.py", line 247, in <module>
    setup_package()
  File "setup.py", line 237, in setup_package
    .format(scipy_req_str, instructions))
ImportError: Scientific Python (SciPy) is not installed.
scikit-learn requires SciPy >= 0.9.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html

$PYTHONPATH = /tmp/tmp4Ngct2conda_skeleton_scikit-learn-0.17b1.tar.gz/scikit-learn-0.17b1
Error: command failed: /home/rolando/miniconda/envs/_build/bin/python setup.py install

$ conda info
Current conda install:

             platform : linux-64
        conda version : 3.18.3
  conda-build version : 1.18.1
       python version : 2.7.10.final.0
     requests version : 2.8.1

@github-actions
Copy link

Hi there, thank you for your contribution to conda-build!

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 in the latest version of conda-build

  2. Comment that the issue is still reproducible and include:

  • What version of conda-build you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Nov 19, 2021
@github-actions
Copy link

Hi again!

This issue has been closed since it has not had recent activity.
Please don't hesitate to leave a comment if that was done prematurely.

Thank you for your contribution.

@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Feb 17, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Feb 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

8 participants