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

pip 19.0 breaks installation of pandas on python 3.4 #6175

Closed
adembo opened this issue Jan 23, 2019 · 8 comments
Closed

pip 19.0 breaks installation of pandas on python 3.4 #6175

adembo opened this issue Jan 23, 2019 · 8 comments
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior
Milestone

Comments

@adembo
Copy link

adembo commented Jan 23, 2019

Environment

  • pip version: 19.0
  • Python version: 3.4
  • OS: Ubuntu 14.04

Description

With the release of pip 19.0, our script for building a Cython extension has broken, at least in Ubuntu 14.04 environments (probably because they're still using Python 3.4). Specifically, pip install pandas now fails.

Expected behavior

While I understand that pip 19.1 will drop support for Python 3.4, I didn't expect that in 19.0, nor in this way. I would expect a deprecation warning and for things to continue working as before.

How to Reproduce

  1. Set up an Ubuntu 14.04 environment.
  2. Upgrade to pip 19.0.
  3. pip install pandas.

Output

$ lsb_release -a
...
Description:	Ubuntu 14.04.5 LTS

$ virtualenv -p python3 a
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in a/bin/python3
Also creating executable in a/bin/python
Installing setuptools, pip...done.
$ source a/bin/activate
(a)$ python --version
Python 3.4.3
(a)$ pip install --upgrade pip
Downloading/unpacking pip from https://files.pythonhosted.org/packages/60/64/73b729587b6b0d13e690a7c3acd2231ee561e8dd28a58ae1b0409a5a2b20/pip-19.0-py2.py3-none-any.whl#sha256=249ab0de4c1cef3dba4cf3f8cca722a07fc447b1692acd9f84e19c646db04c9a
  Downloading pip-19.0-py2.py3-none-any.whl (1.4MB): 1.4MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Uninstalling pip:
      Successfully uninstalled pip
Successfully installed pip
Cleaning up...
(a)$ pip --version
pip 19.0 from /home/jenkins-slave/a/lib/python3.4/site-packages/pip (python 3.4)
(a)$ pip install pandas
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pandas
  Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  Complete output from command /home/jenkins-slave/a/bin/python3 /home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpsknqc6o3:
  Traceback (most recent call last):
    File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 115, in get_requires_for_build_wheel
      return _get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 101, in _get_build_requires
      _run_setup()
    File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 85, in _run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 27, in <module>
      import versioneer
  ImportError: No module named 'versioneer'
  
  ----------------------------------------
@pradyunsg
Copy link
Member

This isn't related to the 3.4 support AFAICT based on a cursory glance but related to isolation of the build and even possibly pandas not having a distribution that'll build under PEP 517.

I'll take a better look at this after lunch, if I can make the time to.

@kjanko
Copy link

kjanko commented Jan 23, 2019

It's not just pandas that's broken, pyinstaller as well with a ModuleNotFound error. Seems like the latest update broke something.

@marcosamorim
Copy link

marcosamorim commented Jan 23, 2019

Got this error when using 19.0. Works fine until 18.1

Exception: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 176, in main status = self.run(options, args) File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 346, in run session=session, autobuilding=True File "/usr/local/lib/python3.6/site-packages/pip/_internal/wheel.py", line 848, in build assert building_is_possible AssertionError

Not only for pandas, it shows this error when finishes to download the packages required for my project, specified by requirements.txt

I've also notice that I'm using --no-cache-dir, and removing it solves the problem too.

@dstufft
Copy link
Member

dstufft commented Jan 23, 2019

@marcosamorim You're looking for #6158, this appears to be a different issue.

@dstufft
Copy link
Member

dstufft commented Jan 23, 2019

I suspect the cause of this issue is that build isolation or the PEP 517 code isn't making sure that the root of the package directory is on the sys.path, because pandas has a versioneer.py sitting next to setup.py. I recall this coming up at some point, but I don't remember off the top of my head what that discussion was. This might be considered an issue with the setuptools build backend instead of pip, or it might be the fault of pip's isolation mechanism.

@dstufft dstufft added the type: bug A confirmed bug or unintended behavior label Jan 23, 2019
@dstufft dstufft added this to the 19.0 milestone Jan 23, 2019
@cjerdonek
Copy link
Member

@adembo Does anything change if you try adding --no-use-pep517 to your pip install invocation?

$ pip install --no-use-pep517 pandas

@dstufft
Copy link
Member

dstufft commented Jan 23, 2019

Just noticed that this is a duplicate of #6163, so I'm going to close this in favor of that issue, please direct discussion to there.

@lock
Copy link

lock bot commented May 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

6 participants