Running scripts with `/usr/bin/env` and `2021.11.5.post0` fails to find correct python
See original GitHub issueIssue description
This is another regression of the recent release. The problem is running scripts using a she-bang + /usr/bin/env python
to reference python. For example:
#!/usr/bin/env python
import sys
print(sys.version)
Running this as executable with the recent stable version of pipenv
yields what is expected:
> pipenv --version
pipenv, version 2021.5.29
> pipenv run ./test.py
3.7.9 (default, Nov 16 2020, 11:56:37)
[Clang 12.0.0 (clang-1200.0.32.21)]
With the new version, it keeps the “default” environment (here 2.7 on a mac)
> pipenv --version
pipenv, version 2021.11.5.post0
> pipenv run ./test.py
2.7.17 (default, Dec 23 2019, 21:25:34)
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.16)]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:17
- Comments:5
Top Results From Across the Web
2021-December.txt - Python mailing list
I navigated to c:\programData|Anaconda3\Scripts> and typed in 'pip install geopandas'. It ran but failed at fiona. I tried import geopandas ...
Read more >篠田 将彦 / CI・CD, DevOps, TDD auf Twitter: „Pipenv の新ver ...
Running scripts with `/usr/bin/env` and `2021.11.5.post0` fails to find correct python · Issue... Issue description This is another ...
Read more >nonetype' object is not callable decorator - maes.gallery
To solve this error: Python nonetype object is not iterable, ... little Python script to set ViewportCapture settings - here's the code: DEBUG...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it might be because
pipenv run
does not add the virtual env to$PATH
.This was what I got running in a
python:3.8-buster
docker container.2021.11.5.post0
2021.5.29
Regardless, this definitely looks like a regression and is causing some issues for me too.
We are experiencing the same issue. Seems the PATH is broken for
pipenv run
.Your deployment broke our CI. Since this breaking change made it into your release, I want to see integration tests verifying the PATH. @frostming