> On 24 May 2018, at 17:33, Steve Piercy <[email protected]> wrote:
> 
> Try pyenv.
> 
> https://github.com/pyenv/pyenv/
> 
> It allows you to set your PATH to any version of Python that you have 
> installed via pyenv.
> 
> --steve

Beware of not changing the default (used by the OS) version of Python by 
changing the PATH variable.

"which python" in Terminal will give you the default python. In my system this 
version is 2.7.10 located at "/usr/bin/python".

On the other hand, "which python3" will give you the default version for python 
3.x. In my system this is a sub-sub-folder of 
"/Library/Frameworks/Python.framework/Versions/...". However, there will be a 
link to it in "/usr/local/bin"

There are several options now, depending on what you want to do.

If you want to run a BBEdit file from the "shebang menu", you may write at the 
beginning:

#!/usr/bin/python

for Mac OS python, and if you want it to run version 3.x, you could write

#!/usr/local/bin/python3

Of course, if what you want to do is make a script or module which will run by 
calling python, then you don't have to write those lines.

In any case, you should be aware the encoding used. Python 3.x expects unicode 
files unlike Python 2.x which expects ASCII files.

Finally, why would you want to use version 3.7 when the stable one is 3.6?

Hope this helps,

Nestor

===============================================
> 
> 
> 
> On 5/24/18 at 8:43 AM, [email protected] ('Matthew Miller' via BBEdit 
> Talk) pronounced:
> 
>> Hello All,
>> 
>> I'm fairly new to BBEDIT, and have recently installed two versions of python 
>> on my Mac mini. The original version of python installed was 2.7, however, I 
>> also wanted to work with python 3.0 for different projects. Now my previous 
>> code that worked with Python 2.7 no longer works after I installed a 
>> separate Python version 3.7.  Any recommendations on how to fix this issue? 
>> My goal would be to set a default python version through BBEDIT that way I 
>> can bounce between the two python versions.
>> 
>> Best,
>> 
>> Matt
>> 
> 
> ------------------------
> Steve Piercy, Eugene, OR
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.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 post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to