unable to run 'conda skeleton pypi'

0 views
Skip to first unread message

Mortada Mehyar

unread,
May 18, 2015, 6:51:55 PM5/18/15
to co...@continuum.io

Hi,

I'd like to make my PyPI package available for conda: https://github.com/mortada/fredapi

I tried the instructions here http://conda.pydata.org/docs/build_tutorials/pkgs.html#using-conda-skeleton-to-build-from-a-pypi-package however I get the following error:

==============================================================
mortada_mehyar ~ $ conda skeleton pypi fredapi
Using url https://pypi.python.org/packages/source/f/fredapi/fredapi-0.3.4.tar.gz (8 KB) for fredapi.
Using "UNKNOWN" for the license
Downloading fredapi (use --no-download to skip this step)
Using cached download
Unpacking fredapi...
done
working in /var/folders/k0/cskwv44x3wjcptsb560drrth0000gq/T/tmpklui4td2conda_skeleton_fredapi
Fetching package metadata: ......
Solving package specifications: .
Applying patch: '/var/folders/k0/cskwv44x3wjcptsb560drrth0000gq/T/tmpklui4td2conda_skeleton_fredapi/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 168 with fuzz 2 (offset 1 line).
Traceback (most recent call last):
  File "setup.py", line 3, in <module>
    from fredapi import __version__
  File "/private/var/folders/k0/cskwv44x3wjcptsb560drrth0000gq/T/tmpklui4td2conda_skeleton_fredapi/fredapi-0.3.4/fredapi/__init__.py", line 3, in <module>
    from fredapi.fred import Fred
  File "/private/var/folders/k0/cskwv44x3wjcptsb560drrth0000gq/T/tmpklui4td2conda_skeleton_fredapi/fredapi-0.3.4/fredapi/fred.py", line 15, in <module>
    import pandas as pd
ImportError: No module named 'pandas'
$PYTHONPATH = /var/folders/k0/cskwv44x3wjcptsb560drrth0000gq/T/tmpklui4td2conda_skeleton_fredapi/fredapi-0.3.4
Error: command failed: /Users/mortada_mehyar/anaconda/envs/_build/bin/python setup.py install
=============================================================

One of the users of my package is also having issues: https://github.com/mortada/fredapi/issues/3

Please help. Thanks!

Mortada

Aaron Meurer

unread,
May 19, 2015, 5:36:16 PM5/19/15
to Mortada Mehyar, conda
The issue is that you have to have pandas installed to run setup.py.
It is generally recommended to avoid this sort of thing, so that
people can setup.py install your package without getting the
dependencies first (especially if you use install_requires to list the
dependencies). A typical way that this is done is to have the version
be listed in a separate file that can be read independently by
setup.py and __init__.py.

Also, note that using skeleton is not required to build a conda
package. It is only a convenient way to build a recipe for packages on
PyPI. But if you yourself maintain the package, then it may be more
advantageous to build the recipe yourself manually, or to use setup.py
bdist_conda.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "conda - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to conda+un...@continuum.io.
> To post to this group, send email to co...@continuum.io.
> Visit this group at http://groups.google.com/a/continuum.io/group/conda/.

Mortada Mehyar

unread,
May 20, 2015, 12:55:41 PM5/20/15
to co...@continuum.io, mortada...@gmail.com

Thanks Aaron, that was exactly the problem. I removed the build time dependency as you suggested (moving the version out etc), and everything works now. Thanks a lot!
Reply all
Reply to author
Forward
0 new messages