On 1 Mar 2024, at 9:11, Benjamin Davidson wrote:

> [Update] I can make this work by including the path to my virtual
> environments python installation in the shebang line:
>
> ie:
>
> #!/Users/me/dev/bbedit_test/venv/bin/python
>
> import requests
> ...
>
> But this still leaves me wondering what the setting, "Always use python
> when a virtual environment is active" is supposed to do.

Ordinarily, when using "Run" from the #! menu, BBEdit will figure out whether 
to use `python` or `python3` to run Python scripts which don't have a !# line.

If "Always use “python” when a virtual environment is active" is turned on, 
*and* a Conda virtual environment is selected in the #! menu, then BBEdit will 
always run `python` and will not try to run `python3`.

Ordinarily, a #! line of "#!/usr/bin/env python" is enough, provided that your 
external Unix environment has $PATH set up correctly.

R.


-- 
Rich Siegel                                 Bare Bones Software, Inc.
<[email protected]>                      <https://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/1358AE2F-1C0C-4B14-90C5-8DB7385EA950%40barebones.com.

Reply via email to