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.

failure on Ubuntu 18.04, ModuleNotFoundError: No module named 'setuptools'

See original GitHub issue

Hi! I’m pretty clueless about Python, GitHub Actions, etc. I’ve got a project that uses install-qt-action; it has been working nicely for months, using @v2 (but this issue is for @v3, read on), and then that recently stopped working on macos-10.15 with this error (log: https://github.com/MesserLab/SLiM/runs/8253692308?check_suite_focus=true):

python3 -m pip install py7zr==0.16.1
Collecting py7zr==0.16.1
  Downloading py7zr-0.16.1-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.7/65.7 kB 1.5 MB/s eta 0:00:00
Collecting texttable
  Downloading texttable-1.6.4-py2.py3-none-any.whl (10 kB)
Collecting pyzstd<0.15.0,>=0.14.4
  Downloading pyzstd-0.14.4.tar.gz (659 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 659.7/659.7 kB 22.0 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting bcj-cffi<0.6.0,>=0.5.1
  Downloading bcj-cffi-0.5.1.tar.gz (35 kB)
  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 metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
  WARNING: Requested bcj-cffi<0.6.0,>=0.5.1 from https://files.pythonhosted.org/packages/97/9c/681442a5b3a5bb3a1210a8ddc6cc6f6a47ea90834b80daa15af767b1c29a/bcj-cffi-0.5.1.tar.gz (from py7zr==0.16.1), but installing version 0.0.0
Discarding https://files.pythonhosted.org/packages/97/9c/681442a5b3a5bb3a1210a8ddc6cc6f6a47ea90834b80daa15af767b1c29a/bcj-cffi-0.5.1.tar.gz (from https://pypi.org/simple/bcj-cffi/): Requested bcj-cffi<0.6.0,>=0.5.1 from https://files.pythonhosted.org/packages/97/9c/681442a5b3a5bb3a1210a8ddc6cc6f6a47ea90834b80daa15af767b1c29a/bcj-cffi-0.5.1.tar.gz (from py7zr==0.16.1) has inconsistent version: filename has '0.5.1', but metadata has '0.0.0'
ERROR: Could not find a version that satisfies the requirement bcj-cffi<0.6.0,>=0.5.1 (from py7zr) (from versions: 0.3.1, 0.4.0, 0.5.0, 0.5.1)
ERROR: No matching distribution found for bcj-cffi<0.6.0,>=0.5.1
Error: The process 'python3' failed with exit code 1

After a bit of head-scratching I realized that @v3 had been released so I updated my tests.yml to that. Unfortunately, that now gives a different error, now on ubuntu-18.04 (log: https://github.com/MesserLab/SLiM/runs/8254237001?check_suite_focus=true):

/usr/bin/python3 -m pip install setuptools wheel py7zr==0.19.* aqtinstall==2.1.*
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/b0/3a/88b210db68e56854d0bcf4b38e165e03be377e13907746f825790f3df5bf/setuptools-59.6.0-py3-none-any.whl (952kB)
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
Collecting py7zr==0.19.*
  Downloading https://files.pythonhosted.org/packages/a2/4e/4e09d932374a0a9ced425cf438aabf385ee1dfb1157d0c8cf4de3f35babf/py7zr-0.19.0-py3-none-any.whl (65kB)
Collecting aqtinstall==2.1.*
  Downloading https://files.pythonhosted.org/packages/b8/42/dacb97cbaa19189f9595f056f67de6073b533a47359d4d4bd10ea96be5e0/aqtinstall-2.1.0-py2.py3-none-any.whl (53kB)
Collecting pyzstd>=0.14.4 (from py7zr==0.19.*)
  Downloading https://files.pythonhosted.org/packages/dc/1a/bea7694b0364981e807afe7b21639f47e559ee181b02cee11ceb3fe551b6/pyzstd-0.15.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (377kB)
Collecting pybcj>=0.6.0 (from py7zr==0.19.*)
  Downloading https://files.pythonhosted.org/packages/26/ff/25952179fa892e7d082a34e5917d747d05a227ba3c83dd3adac1c3f0be24/pybcj-1.0.1.tar.gz (2.1MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'

I have no idea what any of this means, but it looks like @v3 is in some way unhappy on ubuntu-18.04. My next stab in the dark will be to conditionally use either @v2 or @v3 depending upon the platform, if I can figure out the syntax for doing that. :-> But this seemed like possibly an issue worth reporting; or more likely, you can at least tell me what I’m doing wrong. Thanks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jurplelcommented, Sep 8, 2022

Glad I could help!

0reactions
bhallercommented, Sep 8, 2022

OK, the new build with that fix has gotten past the Qt install on all platforms with @v3, I think, so all seems to be well. Thanks very much for your advice, flipping this flag would not have occurred to me for a very long time. :-> Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 3: ImportError "No Module named Setuptools"
I tried to install Ansible and it failed with. ModuleNotFoundError: No module named 'setuptools_rust'. python3-setuptools was already in place, so upgradingΒ ...
Read more >
[Fixed] ModuleNotFoundError: No module named 'setuptools'
How to Fix β€œModuleNotFoundError: No module named 'setuptools'” in PyCharm Β· Open File > Settings > Project from the PyCharm menu. Β· Select...
Read more >
How to fix "ImportError: No module named setuptools" on Linux
Question: I was trying to install a Python package using setup.py ("python setup.py install"). However, it failed with the following error ...
Read more >
ModuleNotFoundError: No module named 'setuptools' in Python
The Python "ModuleNotFoundError: No module named 'setuptools'" occurs when setuptools is not installed in our Python environment. To solve the error,Β ...
Read more >
No module named 'setuptools.command.build' Β· Issue ... - GitHub
command.build' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exitedΒ ...
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