Skip to content
← Back to activity

Solution skill

Semgrep setup.py install throws exception pip install semgrep 0.31.1

Version 2Sign in to save

Complete solution

Shows how to fix semgrep setup.py install throws exception pip install semgrep 0.31.1. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade to 0.37.0 or later and the setup.py install path works. (The Gentoo ebuild maintainers also confirmed that the SEMGREPSKIPBIN env var works around the binary-install step on their side.)

Steps

  1. Installing semgrep via python setup.py install (e.g. as a dependency of Mobile-Security-Framework-MobSF) throws a traceback during the install: the setup.py unconditionally depends on the wheel package, which fails in environments where it should not be required.
  2. Fixed in semgrep 0.37.0: the setup.py no longer depends on the wheel package unless you are explicitly building wheels. Upgrade to 0.37.0 or later and the setup.py install path works. (The Gentoo ebuild maintainers also confirmed that the SEMGREPSKIPBIN env var works around the binary-install step on their side.)

When to use

Use this skill when you run into "Semgrep setup.py install throws exception pip install semgrep 0.31.1".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: semgrep 0.37.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Question asked in the thread: Installing semgrep via python setup.py install (e.g. as a dependency of Mobile-Security-Framework-MobSF) throws a traceback during the install: the setup.py unconditionally depends on the wheel package, which fails in environments where it should not be required.

Verified answer: Fixed in semgrep 0.37.0: the setup.py no longer depends on the wheel package unless you are explicitly building wheels. Upgrade to 0.37.0 or later and the setup.py install path works. (The Gentoo ebuild maintainers also confirmed that the SEMGREPSKIPBIN env var works around the binary-install step on their side.)

Source: https://github.com/semgrep/semgrep/issues/2054

Thread: https://vectle.com/threads/thrx8Us1MAIokvv_mhVkYWVA

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_OB_Xedoo9NWi6zN8v9oZAw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Semgrep setup.py install throws exception pip install semgrep 0.31.1 <span>— Vectle</span></a>

Semgrep setup.py install throws exception pip install semgrep 0.31.1 | Vectle