I'm on Mac 10.8.5
I tried to locate os.py with python3 from Terminal:
$ python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.__file__
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py'
>>>
But when I try to locate it in Mac with Finder and Copy the full path I get this:
/Applications/Adobe After Effects CC/Plug-ins/MAXON CINEWARE AE/(CINEWARE Support)/bin/resource/modules/python/res/Python.osx.framework/lib/python2.6
I must have did something wrong with other programs in the past...
How can I solve this and put python3 in the correct path, so out from After Effects ?
Ths for your help.
Related
I just noticed this on my macintosh. Running $ python fires up an interpreter session with the following lines:
$ python2.7
Python 2.7.10 (default, Feb 6 2017, 23:53:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
The second line of the starting up text mentions GCC and clang versions.
How are these two related to the python interpreter? Given that python is an interpreted language, there should be no whisper of a compiler at all, so I was curious as to why this is shown.
Now here's the same thing with python3.6:
$ python3.6
Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
This time there's no mention of clang. Why's that?
The CPython interpreter is itself written in C. It matters what compiler was used to convert the C code into a binary executable; behaviour and performance can differ in subtle ways, so it is mentioned in the banner.
You have two different Python binaries, the differences in the banner reflect differences in how those binaries where built. Since the Python 2.7 release is the one that comes bundled with OS X, it was built by Apple engineers using a different toolchain (using the clang compiler) from the Python 3.6 installation, which you must have installed separately (OS X doesn't include Python 3.6 yet). The latter was compiled with the GCC compiler.
I am trying to use python 3.4 in my django 1.9 app because python 3.5 is to new and doesn't work with packages that I need. I tried this
virtualenv -p /usr/bin/python3.4 venv
from here
but when Itried that i got this error message
The executable /usr/bin/python3.4 (from --python=/usr/bin/python3.4) does not exist
How canI make this work? thanks
I want to eventually push this to heroku server
EDIT
if I type
apples-MBP:myheroku ray$ python3
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
if i type python34
apples-MBP:myheroku ray$ python34
-bash: python34: command not found
if I just type python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
I have installed cassandra 3.0.0 and trying to connect to connect cqlsh. when i try to hit ./bin/cqlsh from the dir of installed cassandra I am getting
python not found. I am using ubunut14.04LTS
when i type python2 in my terminal it says
python2
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
when i type python3 in my terminal it says
python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
so this mean it is already installed . But yes when i type
python in terminal it says
python
The program 'python' is currently not installed. You can install it by typing:
apt-get install python-minimal
even when i install python-minimal it doesn work.
please suggest..
Create a symbolic link /usr/bin/python pointing to either /usr/bin/python2 or /usr/bin/python3
When I type "python" into a terminal, I get this:
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
I am unsure whether this means Ananconda has been successfully installed?
To install the Anaconda-1.9.0-MacOSX-x86_64.sh, open Terminal and run
/bin/bash Anaconda-1.9.0-MacOSX-x86_64.sh
The installer will ask a series of questions and install it in a prefix you determine. When you are done, close the Terminal and open it again. (This is so that your Terminal picks up the new PATH which points to the prefix/bin.)
When it is installed you should see something like the following in the Terminal:
$ python
Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Instead of:
$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
I'd like, for example:
$ python --quiet
>>>
You can try this:
$ python -ic ""
>>>
Python 3 now has a -q flag:
python3 -q
For Python 2, I have a startup file, so this works for me:
python2 -i "$PYTHONSTARTUP"