Skip to content

Regression: pip wheel pandas does not work any more with pandas 0.19.0 #14677

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

Closed
HolgerPeters opened this issue Nov 17, 2016 · 1 comment
Closed
Labels
Build Library building on various platforms

Comments

@HolgerPeters
Copy link

A small, complete example of the issue

Setup

% virtualenv venv
New python executable in venv/bin/python2.7
Also creating executable in venv/bin/python
Installing setuptools, pip, wheel...done.
% . venv/bin/activate
% pip list           
You are using pip version 7.0.3, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pip (7.0.3)
setuptools (17.0)
wheel (0.24.0)
hpeters@MAC-025s-MacBook-Pro-2 /tmp % pip install -U pip setuptools wheel
You are using pip version 7.0.3, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting setuptools
  Using cached setuptools-28.8.0-py2.py3-none-any.whl
Collecting wheel
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 7.0.3
    Uninstalling pip-7.0.3:
      Successfully uninstalled pip-7.0.3
  Found existing installation: setuptools 17.0
    Uninstalling setuptools-17.0:
      Successfully uninstalled setuptools-17.0
  Found existing installation: wheel 0.24.0
    Uninstalling wheel-0.24.0:
      Successfully uninstalled wheel-0.24.0
Successfully installed pip-9.0.1 setuptools-28.8.0 wheel-0.29.0

The issue

One cannot use pip wheel to build pandas 0.19.0 and higher:

% pip wheel "pandas==0.19.0" --no-binary :all:
Collecting pandas==0.19.0
  Using cached pandas-0.19.0.tar.gz
Collecting python-dateutil (from pandas==0.19.0)
  Using cached python-dateutil-2.6.0.tar.gz
Collecting pytz>=2011k (from pandas==0.19.0)
  Using cached pytz-2016.7.zip
Collecting numpy>=1.7.0 (from pandas==0.19.0)
  Using cached numpy-1.11.2.tar.gz
Collecting six>=1.5 (from python-dateutil->pandas==0.19.0)
  Using cached six-1.10.0.tar.gz
Building wheels for collected packages: pandas, python-dateutil, pytz, numpy, six
  Running setup.py bdist_wheel for pandas ... error
  Complete output from command /private/tmp/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/kn/3fznwwr15z9chdd30p3q4qm80000gp/T/pip-build-RJ3_w0/pandas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/kn/3fznwwr15z9chdd30p3q4qm80000gp/T/tmpVWnJJSpip-wheel-:
  running bdist_wheel
  running build
......
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/kn/3fznwwr15z9chdd30p3q4qm80000gp/T/pip-build-RJ3_w0/pandas/setup.py", line 680, in <module>
      **setuptools_kwargs)
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/private/tmp/venv/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/private/var/folders/kn/3fznwwr15z9chdd30p3q4qm80000gp/T/pip-build-RJ3_w0/pandas/setup.py", line 371, in build_extensions
      build_ext.build_extensions(self)
    File "/private/var/folders/kn/3fznwwr15z9chdd30p3q4qm80000gp/T/pip-build-RJ3_w0/pandas/setup.py", line 129, in build_extensions
      raise ImportError('Building pandas requires cython')
  ImportError: Building pandas requires cython
  
  ----------------------------------------
  Failed building wheel for pandas
  Running setup.py clean for pandas
  Running setup.py bdist_wheel for python-dateutil ... done
  Stored in directory: /private/tmp
  Running setup.py bdist_wheel for pytz ... done
  Stored in directory: /private/tmp
  Running setup.py bdist_wheel for numpy ... |^error
  Failed building wheel for numpy
  Running setup.py clean for numpy
^C  Failed cleaning build dir for numpy
  Running setup.py bdist_wheel for six ... done
  Stored in directory: /private/tmp
Successfully built python-dateutil pytz six
Failed to build pandas numpy
ERROR: Failed to build one or more wheels

Expected Output

With pandas 0.18 it is possible to build a wheel using pip wheel

% pip wheel "pandas==0.18.0" --no-binary :all:
Collecting pandas==0.18.0
  Downloading pandas-0.18.0.tar.gz (7.1MB)
    100% |################################| 7.1MB 169kB/s 
Collecting python-dateutil (from pandas==0.18.0)
  Downloading python-dateutil-2.6.0.tar.gz (258kB)
    100% |################################| 266kB 3.2MB/s 
Collecting pytz>=2011k (from pandas==0.18.0)
  Downloading pytz-2016.7.zip (497kB)
    100% |################################| 501kB 2.3MB/s 
Collecting numpy>=1.7.0 (from pandas==0.18.0)
  Using cached numpy-1.11.2.tar.gz
Collecting six>=1.5 (from python-dateutil->pandas==0.18.0)
  Downloading six-1.10.0.tar.gz
Building wheels for collected packages: pandas, python-dateutil, pytz, numpy, six
  Running setup.py bdist_wheel for pandas ... done
....
Successfully built pandas python-dateutil pytz numpy six

Discussion

I believe that this is due to Pandas not spelling out all of its build-time-requirements (like Cython) in the setup_requires section.

@jreback
Copy link
Contributor

jreback commented Nov 17, 2016

this was already fixed with 0.19.1 see #14204

@jreback jreback closed this as completed Nov 17, 2016
@jreback jreback added the Build Library building on various platforms label Nov 17, 2016
@jreback jreback added this to the No action milestone Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

2 participants