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

ImportError: cannot import name 'open_for_csv' from 'wheel.util' (/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/wheel/util.py) #206

Closed
mgedmin opened this issue Nov 6, 2019 · 4 comments

Comments

@mgedmin
Copy link

mgedmin commented Nov 6, 2019

I'm not sure if this is a problem with auditwheel, or if (more likely) it's a problem with the pypa/manylinux1_x86_64 Docker image published on quay.io, but auditwheel repair fails for us with the following error:

+ auditwheel repair wheelhouse/persistent-4.5.1-cp27-cp27m-linux_x86_64.whl -w /io/wheelhouse/
Traceback (most recent call last):
  File "/usr/local/bin/auditwheel", line 10, in <module>
    sys.exit(main())
  File "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/auditwheel/main.py", line 50, in main
    rval = args.func(args, p)
  File "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/auditwheel/main_repair.py", line 49, in execute
    from .repair import repair_wheel
  File "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/auditwheel/repair.py", line 14, in <module>
    from .wheeltools import InWheelCtx, add_platforms
  File "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/auditwheel/wheeltools.py", line 15, in <module>
    from wheel.util import urlsafe_b64encode, open_for_csv, native  # type: ignore
ImportError: cannot import name 'open_for_csv' from 'wheel.util' (/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/wheel/util.py)

Full travis build log is available at https://travis-ci.org/zopefoundation/persistent/jobs/608123705

@mgedmin
Copy link
Author

mgedmin commented Nov 6, 2019

This might be a duplicate of #102. I see the persistent build script does /opt/python/*/bin/pip install -U wheel for all pythons in /opt/python/*. It was my assumption that those Pythons are different from the one used by auditwheel itself (/opt/_interna/cpython-3.7.5), but that assumption could be mistaken.

UPDATE it was mistaken. I've now discoverd the Dockerfile and build scripts, and it seems auditwheel is installed right into /opt/python/cp37-cp37m, which is one of those pythons where we bravely pip install -U wheel.

So this is a duplicate of #102, and I'm closing it as such.

@mgedmin mgedmin closed this as completed Nov 6, 2019
@matthew-brett
Copy link
Contributor

Well - except - doesn't this mean that we need to fix the manylinux image to make sure we're installing a suitably old version of wheel?

@mgedmin
Copy link
Author

mgedmin commented Nov 6, 2019

The image has the right version of wheel. Our build script was running pip install -U pip setuptools wheel cffi which broke things.

@matthew-brett
Copy link
Contributor

Aha - thanks for correcting me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants