venv creation fails when `sys.executable == ''`
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 72/100
Research direction
Start in python-stdlib/venv/venv/main.py around line 93 and reproduce the case where sys.executable is an empty string. Check the venv creation path and confirm it handles that value without attempting the failing copy command. Done when venv creation succeeds in this environment and the existing executable case remains supported.
Written by the indexing model from the issue text.
Description
from venv
# Add a `micropython` binary in $PATH pointing to this binary.
if hasattr(sys, "executable"):
os.system("cp {} {}".format(sys.executable, venv_bin_path + os.sep + "micropython"))
but on my local copy this happens
MicroPython v1.24.0 on 1980-01-01; darwin [GCC 4.2.1] version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import sys
>>> sys.executable
''
>>>
so maybe it is best to add and sys.executable to the check?
if hasattr(sys, "executable") and sys.executable:
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 4h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micropython/micropython-lib
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#1074 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
micropython/micropython-lib#931 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
micropython/micropython-lib#795 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#762 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
micropython/micropython-lib#342 ·
All issues in micropython/micropython-lib
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100