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.

ModuleNotFoundError installing package with setuptools_scm

See original GitHub issue

Describe the bug

When I try to install cutlet I get this error:

 ERROR: Command errored out with exit status 1:
    command: /tmp/tmpw195j32y/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-db8tw4n5/cutlet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-db8tw4n5/cutlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rwdkx6tl
        cwd: /tmp/pip-install-db8tw4n5/cutlet/
   Complete output (5 lines):
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "/tmp/pip-install-db8tw4n5/cutlet/setup.py", line 7, in <module>
       import setuptools_scm
   ModuleNotFoundError: No module named 'setuptools_scm'
   ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

How to reproduce

This should reproduce the error:

pipx install cutlet

I’m on Linux but I don’t think platform is relevant so I’ll omit verbose output, let me know if it would actually help.

Expected behavior

cutlet should have installed without issue.


I maintain this package, so I’d like to make sure it works. I’m not sure if I’m doing something wrong and should change it or if this is an issue with pipx.

To clarify why I’m importing setuptools_scm, if it’s not present the package is installed as version 0.0.0, which can cause issues. Importing makes sure that the package is present rather than building a package with a bogus version. setuptools-scm is specified in setup_requires, so I’m not sure if there’s something else I should do here.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Aug 9, 2020

scripts are platform-specific and don’t work well on Windows, so it’s better to use console_scripts instead anyway 🙂

0reactions
casperdclcommented, Aug 14, 2020

fyi https://github.com/iterative/shtab uses setuptools_scm without needing pyproject.toml

Read more comments on GitHub >

github_iconTop Results From Across the Web

setuptools-scm - PyPI
setuptools_scm extracts Python package versions from git or hg metadata instead of declaring them as the version argument or in a SCM managed...
Read more >
No module named 'setuptools_scm' · Issue #359 - GitHub
I have setuptools_scm installed in my virtual environment. If I start a new python session from anywhere in the environment and import ...
Read more >
PyGObject - No module named 'setuptools_scm'
I getting this type errors: 1. pip install PyGObject E:\Py38venv\lib\site-packages\_distutils_hack\__init__.py:35: UserWarning: Setuptools ...
Read more >
Frequently Asked Questions - PyScaffold
This means that setuptools-scm could not find an intact git repository. If you still want to build a distribution from the source code...
Read more >
Installation — emcee - Read the Docs
python -m pip install -U pip pip install -U setuptools setuptools_scm pep517 pip ... emcee packages that can be installed with the system...
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