Ouranosinc / xclim

Library of derived climate variables, ie climate indicators, based on xarray.
https://xclim.readthedocs.io/en/stable/
Apache License 2.0
333 stars 59 forks source link

Installation '__NUMPY_SETUP__' exception #154

Closed Balinus closed 5 years ago

Balinus commented 5 years ago

Description

Error during Installation process following guidelines.

What I Did

$ git clone git@github.com:Ouranosinc/xclim.git
$ mkvirtualenv xclim
Using base prefix '/home/proy/anaconda3'
New python executable in /home/proy/.virtualenvs/xclim/bin/python
Installing setuptools, pip, wheel...
done.
Overwriting /home/proy/.virtualenvs/xclim/bin/activate with new content
Overwriting /home/proy/.virtualenvs/xclim/bin/activate.fish with new content
Overwriting /home/proy/.virtualenvs/xclim/bin/activate.csh with new content
Overwriting /home/proy/.virtualenvs/xclim/bin/activate_this.py with new content
virtualenvwrapper.user_scripts creating /home/proy/.virtualenvs/xclim/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/proy/.virtualenvs/xclim/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/proy/.virtualenvs/xclim/bin/preactivate
virtualenvwrapper.user_scripts creating /home/proy/.virtualenvs/xclim/bin/postactivate
virtualenvwrapper.user_scripts creating /home/proy/.virtualenvs/xclim/bin/get_env_details

(xclim) $ cd xclim
(xclim) $ python setup.py develop
/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/dist.py:475: UserWarning: Normalizing '0.7-beta' to '0.7b0'
  normalized_version,
running develop
running egg_info
writing xclim.egg-info/PKG-INFO
writing dependency_links to xclim.egg-info/dependency_links.txt
writing requirements to xclim.egg-info/requires.txt
writing top-level names to xclim.egg-info/top_level.txt
reading manifest file 'xclim.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'CONTRIBUTING.rst'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
warning: no files found matching '*.jpg' under directory 'docs'
warning: no files found matching '*.gif' under directory 'docs'
writing manifest file 'xclim.egg-info/SOURCES.txt'
running build_ext
Creating /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/xclim.egg-link (link to .)
Adding xclim 0.7b0 to easy-install.pth file

Installed /home/proy/GitRepos/xclim
Processing dependencies for xclim==0.7b0
Searching for six
Reading https://pypi.org/simple/six/
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl#sha256=3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c
Best match: six 1.12.0
Processing six-1.12.0-py2.py3-none-any.whl
Installing six-1.12.0-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
Adding six 1.12.0 to easy-install.pth file

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/six-1.12.0-py3.6.egg
Searching for unittest2
Reading https://pypi.org/simple/unittest2/
Downloading https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl#sha256=13f77d0875db6d9b435e1d4f41e74ad4cc2eb6e1d5c824996092b3430f088bb8
Best match: unittest2 1.1.0
Processing unittest2-1.1.0-py2.py3-none-any.whl
Installing unittest2-1.1.0-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
writing requirements to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/unittest2-1.1.0-py3.6.egg/EGG-INFO/requires.txt
Adding unittest2 1.1.0 to easy-install.pth file
Installing unit2 script to /home/proy/.virtualenvs/xclim/bin

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/unittest2-1.1.0-py3.6.egg
Searching for inspect2
Reading https://pypi.org/simple/inspect2/
Downloading https://files.pythonhosted.org/packages/72/27/c979524f27502080ab84833a6a5a8264f3cac4d7aa982ee67cf50842a5ab/inspect2-0.1-py2.py3-none-any.whl#sha256=462122b25221c419745c630fe9efd2ddacf0198b6e092c2b59d60270e9083e58
Best match: inspect2 0.1
Processing inspect2-0.1-py2.py3-none-any.whl
Installing inspect2-0.1-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
Adding inspect2 0.1 to easy-install.pth file

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/inspect2-0.1-py3.6.egg
Searching for boltons>=18.0
Reading https://pypi.org/simple/boltons/
Downloading https://files.pythonhosted.org/packages/38/b4/94690b531740f8be7dd853bc3a97bc113ff4adc7aa4a9cc802efac86dc78/boltons-18.0.1-py2.py3-none-any.whl#sha256=b385b022ab7e23492f1aaed816c3591eb7efc75659046ba85aabd993a5a92891
Best match: boltons 18.0.1
Processing boltons-18.0.1-py2.py3-none-any.whl
Installing boltons-18.0.1-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
Adding boltons 18.0.1 to easy-install.pth file

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/boltons-18.0.1-py3.6.egg
Searching for pint>=0.8
Reading https://pypi.org/simple/pint/
Downloading https://files.pythonhosted.org/packages/15/9d/bf177ebbc57d25e9e296addc14a1303d1e34d7964af5df428a8332349c42/Pint-0.9-py2.py3-none-any.whl#sha256=7ece3f639ad58073ce49982b022d464014e6d91d0b3eaa89c8e8ea9c38e32659
Best match: Pint 0.9
Processing Pint-0.9-py2.py3-none-any.whl
Installing Pint-0.9-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
Adding Pint 0.9 to easy-install.pth file

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/Pint-0.9-py3.6.egg
Searching for xarray>=0.11.3
Reading https://pypi.org/simple/xarray/
Downloading https://files.pythonhosted.org/packages/14/e8/244fc7d31846e30f4edd4d1288f36761506f9bff0c954b76139448beebd0/xarray-0.11.3-py2.py3-none-any.whl#sha256=5f9b44c2b5c0ac2234e48f852944309c33650653a31d6b866592fcc07215d0b1
Best match: xarray 0.11.3
Processing xarray-0.11.3-py2.py3-none-any.whl
Installing xarray-0.11.3-py2.py3-none-any.whl to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages
writing requirements to /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/xarray-0.11.3-py3.6.egg/EGG-INFO/requires.txt
Adding xarray 0.11.3 to easy-install.pth file

Installed /home/proy/.virtualenvs/xclim/lib/python3.6/site-packages/xarray-0.11.3-py3.6.egg
Searching for bottleneck>=1.2.1
Reading https://pypi.org/simple/bottleneck/
Downloading https://files.pythonhosted.org/packages/05/ae/cedf5323f398ab4e4ff92d6c431a3e1c6a186f9b41ab3e8258dff786a290/Bottleneck-1.2.1.tar.gz#sha256=6efcde5f830aed64feafca0359b51db0e184c72af8ba6675b4a99f263922eb36
Best match: Bottleneck 1.2.1
Processing Bottleneck-1.2.1.tar.gz
Writing /tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/setup.cfg
Running Bottleneck-1.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/egg-dist-tmp-etnxayge
No Bottleneck unit testing available.
Traceback (most recent call last):
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/setup.py", line 110, in <module>
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/home/proy/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 163, in run
    self.run_command("egg_info")
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 296, in run
    self.find_sources()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
    mm.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 534, in run
    self.add_defaults()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
    sdist.add_defaults(self)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
    self._add_defaults_ext()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
    build_ext = self.get_finalized_command('build_ext')
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "/tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/setup.py", line 24, in finalize_options
    'unittest2',
AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 68, in <module>
    zip_safe=False,
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/home/proy/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/develop.py", line 38, in run
    self.install_for_development()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/develop.py", line 156, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 752, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 705, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
    run_setup(setup_script, args)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/home/proy/anaconda3/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/proy/anaconda3/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/setup.py", line 110, in <module>
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/home/proy/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 163, in run
    self.run_command("egg_info")
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/proy/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 296, in run
    self.find_sources()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
    mm.run()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 534, in run
    self.add_defaults()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
    sdist.add_defaults(self)
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
    self._add_defaults_ext()
  File "/home/proy/.virtualenvs/xclim/local/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
    build_ext = self.get_finalized_command('build_ext')
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/home/proy/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "/tmp/easy_install-3ad7gx_t/Bottleneck-1.2.1/setup.py", line 24, in finalize_options
    'unittest2',
AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'

git log output

(xclim) $ git log
commit 39da7b0f0f0c0282b1d5d1144bc7deead8a2f6da (HEAD -> master, origin/master, origin/HEAD)
Author: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Date:   Wed Feb 6 16:55:04 2019 -0500

    Tagging Beta (#153)

    * added local path in docs directory

    * copied itable content in conf.py

    * Readded Python2.7

commit ad4ac504f9d6c70d181e5cc430f20f97bbbaa58c
Merge: 9d9a69e 6008686
Author: David Huard <huard.david@ouranos.ca>
Date:   Wed Feb 6 13:48:00 2019 -0500

    Merge pull request #152 from Ouranosinc/beta

    Beta
Zeitsperre commented 5 years ago

Your changes in #155 already address the issue. pip install -e . is a better alternative to python setup.py develop.

For more information: https://stackoverflow.com/a/15731459/7322852