[SciPy-Dev] Setting up a dev environment with conda

Luke Zoltan Kelley lkelley at cfa.harvard.edu
Sat Oct 17 16:29:02 EDT 2015


I'm trying to play around with development for numpy.  I've just switched over to using anaconda to make this easier, but I'm having trouble with the details.

I've installed anaconda, and made an environment for numpy development:

    $ source activate numpy-py27
    $ conda list -e
    # platform: osx-64
    cython=0.23.4=py27_0
    nose=1.3.7=py27_0
    openssl=1.0.1k=1
    pip=7.1.2=py27_0
    python=2.7.10=1
    readline=6.2=2
    setuptools=18.4=py27_0
    sqlite=3.8.4.1=1
    tk=8.5.18=0
    wheel=0.26.0=py27_1
    zlib=1.2.8=0

I've cloned my fork of the numpy/numpy git repo to a local directory, and built the module in-place, i.e.

    $ git clone https://github.com/<USERNAME>/numpy.git
    $ cd numpy
    $ python setup.py build_ext --inplace

But when I try to install, I get the error:

      $ python setup.py install
      Running from numpy source directory.
Traceback (most recent call last):
  File "setup.py", line 264, in <module>
    setup_package()
  File "setup.py", line 248, in setup_package
    from numpy.distutils.core import setup
  File "/Users/lzkelley/Programs/public/numpy/numpy/distutils/__init__.py", line 21, in <module>
    from numpy.testing import Tester
  File "/Users/lzkelley/Programs/public/numpy/numpy/testing/__init__.py", line 14, in <module>
    from .utils import *
  File "/Users/lzkelley/Programs/public/numpy/numpy/testing/utils.py", line 17, in <module>
    from numpy.core import float32, empty, arange, array_repr, ndarray
  File "/Users/lzkelley/Programs/public/numpy/numpy/core/__init__.py", line 59, in <module>
    test = Tester().test
  File "/Users/lzkelley/Programs/public/numpy/numpy/testing/nosetester.py", line 180, in __init__
    if raise_warnings is None and '.dev0' in np.__version__:
AttributeError: 'module' object has no attribute '__version__'

I can circumvent this by adding the `numpy` directory to my `PYTHONPATH` --- but that also prevents me from isolating the development environment...  what is the standard procedure here?

Thanks!
Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20151017/baf1a5cc/attachment.html>


More information about the SciPy-Dev mailing list