Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

pyvenv is no longer compatible with Python built from source

Offen
#540 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
devops

Rechercherichtung

Start at the ::python::pyvenv resource entry point and trace how it installs the python3.7-venv package. Verify the behavior for a Python 3.7 interpreter built from source, then make completion avoid the package step when the venv module is already available. Done means the virtualenv is created without requiring an unavailable apt package.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.56
  • Ruby: 2.4.4
  • Distribution: Ubuntu 16.04
  • Module version: 4.0.0

How to reproduce (e.g Puppet code you use)

  ::python::pyvenv { $venv_path :
    version => '3.7.6',
  }

What are you seeing

The virtualenv is not created because it cannot install the python3.7-venv package via apt. This is because my version of python3.7 was built from source, and therefore I didn't get the python3.7 package via apt. Since python3.7 is required to install python3.7-venv via apt, this fails.

When built from source, venv is already included, so an additional package containing the venv module is not necessary, so this step should be skipped.

What behaviour did you expect instead

I expected the virtualenv to be correctly created

Output log

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python3.7-venv' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python3.7-venv
E: Couldn't find any package by glob 'python3.7-venv'
E: Couldn't find any package by regex 'python3.7-venv'

Any additional information you'd like to impart

I believe that the best way to skip this step if necessary would be to check for the presence of the venv module. This could either be done using something like python3.7 -c "import venv" or pydoc3.7 venv, or checking if the folder exists at /usr/local/lib/python3.7/venv (not sure if this directory changes).

Vorherrschende Sprache
Ruby
Sterne
196
Forks
371
Ø Merge
5 Std. 54 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus voxpupuli/puppet-python

Alle Issues in voxpupuli/puppet-python

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.