question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bdist_wheel fails on WSL Ubuntu 18.04

See original GitHub issue

Edit: --dry-run also results in errors, which I assume is because no directories are actually being created.

Was building a pure Python project using setuptools 49.6.0 in a virtual environment using Python 3.8.2 on WSL Ubuntu 18.04. Running python3 setup.py sdist bdist_wheel causes setup.py to raise an error right after printing running install_scripts to the console, right before it adds the license and starts building the wheel. The error reads as follows (project is called touketsu):

error: [('build/bdist.linux-x86_64/wheel/touketsu-0.1.0-py3.8.egg-info', 'build/bdist.linux-x86_64/wheel/touketsu-0.1.0.dist-info', "[Errno 16] Device or resource busy: 'build/bdist.linux-x86_64/wheel/touketsu-0.1.0.dist-info'")]

Here . would be the repository’s top level directory. Not sure why this is happening; checked the file permissions (rwx for all groups) and even used sudo, but kept getting the same error.

Help would be greatly appreciated. Thanks 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
abravalhericommented, Jan 28, 2022

Hi @phetdam for reporting the problem and also the solution.

I use WSL all the time here and I have never faced such problem. I assume it might be related to the code editor or IDE?

I think we can close this issue now since it does not seem to be related to setuptools directly, but please let me know if I am wrong and I will re-open it (it would be nice to have some dummy repository with a reproduction to try it out).

1reaction
GoelPricommented, Oct 11, 2021

Been a while since I had this issue now that I usually just build wheels on remote CI machines but I think this is a WSL thing and may not necessarily be directly resolvable by tweaking setuptools. As mentioned, try disabling search indexing.

@s27y I also was running VS Code in WSL; with search indexing disabled I could keep VS Code open when building the wheel.

@GoelPri Maybe try @s27y’s workaround first? Again, this might be a WSL issue. Also, if you are interested in distributing wheels, I recommend you get in the habit of using a CI service, ex. through GitHub Actions, and try ensuring your wheel builds on multiple platforms. This usually shouldn’t be too bad unless you have C extensions in your project, in which case I would recommend using cibuildwheel to build manylinux wheels for you. I’ve built manylinux wheels “by hand” before, i.e. with my own hacky shell scripts, and that was definitely a not-fun experience I would like other people to avoid.

Thank you so much! It works now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is python setup.py saying invalid command 'bdist_wheel ...
Had to install the wheel package. Everything was up to date but still giving the error. pip install wheel. then python setup.py bdist_wheel....
Read more >
[Solved]-How to run bdist_wheel on Ubuntu 18.04?-docker
First, some notes to the error: invalid command 'bdist_wheel' output. When running pip install <pkgname> , pip will try to find a prebuilt...
Read more >
PIP install fails on Ubuntu on Windows - cppyy - Bitbucket
I would like to install cppyy, but when I try with pip, it fails while compiling cppyy-backend with a non-specific "No such file...
Read more >
Prodigy installation error linux Failed to build starlette peewee ...
Ubuntu 18.04.5 LTS Python 3.6.9. Building wheels for collected packages: peewee, starlette, uvloop. Running setup.py bdist_wheel for peewee ...
Read more >
Running "python3 setup.py bdist_wheel" on a /mnt/c/... path ...
I'm trying to build a bdist package of my python app but the command "python3 setup.py bdist_wheel" fails with error "Errno 13: Permission...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found