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

Python 3.9 + 20.0.6: No module named pip #1675

Closed
hugovk opened this issue Feb 27, 2020 · 2 comments
Closed

Python 3.9 + 20.0.6: No module named pip #1675

hugovk opened this issue Feb 27, 2020 · 2 comments
Labels

Comments

@hugovk
Copy link
Contributor

hugovk commented Feb 27, 2020

Issue

Describe what's the expected behaviour and what you're observing.

Using tox with Python 3.9-dev and nightly on Travis CI is failing with "No module named pip".

This started with virtualenv 20.0.6. It worked fine with virtualenv 20.0.5.

Python 3.6-3.8 and their -dev versions are also fine with 20.0.6.

language: python
cache:
  pip: true
  directories:
    - $HOME/.cache/pre-commit

matrix:
  fast_finish: true
  include:
    - python: nightly
    - python: 3.9-dev
    - python: 3.8-dev
    - python: 3.7-dev
    - python: 3.6-dev
    - python: 3.8
      env: TOXENV=lint
    - python: 3.8
    - python: 3.7
    - python: 3.6

install:
  - pip install -U pip
  - pip install -U tox-travis

script:
  - tox
py39 create: /home/travis/build/hugovk/pypistats/.tox/py39
py39 inst: /home/travis/build/hugovk/pypistats/.tox/.tmp/package/1/pypistats-0.10.2.dev2.zip
ERROR: invocation failed (exit code 1), logfile: /home/travis/build/hugovk/pypistats/.tox/py39/log/py39-1.log
================================== log start ===================================
Processing ./.tox/.tmp/package/1/pypistats-0.10.2.dev2.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/travis/build/hugovk/pypistats/.tox/py39/bin/python /home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpqsagygxr
         cwd: /tmp/pip-req-build-citr7lc7
    Complete output (42 lines):
    /home/travis/build/hugovk/pypistats/.tox/py39/bin/python: No module named pip
    Traceback (most recent call last):
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/opt/python/3.9-dev/lib/python3.9/subprocess.py", line 372, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/home/travis/build/hugovk/pypistats/.tox/py39/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp5dnb6xs7', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
        main()
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/build_meta.py", line 249, in run_setup
        super(_BuildMetaLegacyBackend,
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/build_meta.py", line 143, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 13, in <module>
        setup(
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 781, in resolve
        dist = best[req.key] = env.best_match(
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1078, in obtain
        return installer(requirement)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['/home/travis/build/hugovk/pypistats/.tox/py39/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp5dnb6xs7', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/travis/build/hugovk/pypistats/.tox/py39/bin/python /home/travis/build/hugovk/pypistats/.tox/py39/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpqsagygxr Check the logs for full command output.

=================================== log end ====================================

https://travis-ci.org/hugovk/pypistats/builds/655722106

Last passing build: https://travis-ci.org/hugovk/pypistats/builds/654501366

Can reproduce locally with Python 3.9.0a2+ and 20.0.6.

Environment

Provide at least:

  • OS: Ubuntu 16.04.6 LTS Xenial
  • pip list of the host python where virtualenv is installed:
$ pip list
Package          Version   
---------------- ----------
atomicwrites     1.3.0     
attrs            19.3.0    
certifi          2019.9.11 
filelock         3.0.12    
mock             3.0.5     
more-itertools   7.2.0     
nose             1.3.7     
numpy            1.17.2    
packaging        19.2      
pip              20.0.2    
pipenv           2018.11.26
pluggy           0.13.0    
py               1.8.0     
pyparsing        2.4.2     
pytest           5.2.1     
setuptools       41.4.0    
six              1.14.0    
toml             0.10.0    
tox              3.14.5    
tox-travis       0.12      
virtualenv       16.7.5    
virtualenv-clone 0.5.3     
wcwidth          0.1.7     
wheel            0.33.6 

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

Using tox, how should I run this?

@hugovk hugovk added the bug label Feb 27, 2020
@hugovk
Copy link
Contributor Author

hugovk commented Feb 27, 2020

Can reproduce locally with Python 3.9.0a2+ and 20.0.6.

Cannot reproduce locally with Python 3.9.0a2+ and 20.0.7.

And cannot reproduce on Travis when forcing an update:

pip install -U "virtualenv>=20.0.7"

https://travis-ci.org/hugovk/pypistats/builds/655728528

Sorry for the false alarm! Hopefully the Travis dev version will be rebuilt with 20.0.7 within the next 24 hours.

@hugovk hugovk closed this as completed Feb 27, 2020
@gaborbernat
Copy link
Contributor

This is duplicate of #1669, which is upstream bug pypa/pip#7778

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants