This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
ways-to-run-python [2017/09/15 08:42] zoza created |
ways-to-run-python [2017/09/15 08:50] zoza [OSX] |
||
---|---|---|---|
Line 6: | Line 6: | ||
<code>/usr/bin/python </code> | <code>/usr/bin/python </code> | ||
is normally going to run python2.7, linked like this /usr/bin/python2.7@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 | is normally going to run python2.7, linked like this /usr/bin/python2.7@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 | ||
+ | when using this native version of python, some dependences might run into permission problems and thus installing modules via pip requires an extra flag "--user" which installs it only for the current users | ||
- | * **pyhton3**: osx comes with python3 installed, which can be called with | + | * **pyhton3**: osx comes with python3 installed, which can be called with |
- | <code>$ python3 </code> command. | + | <code>$ python3 </code> |
+ | |||
+ | * **conda** is a package and environment management system for Python, R, Node.js, Java and other application stacks. It creates an environment (-n name) using a specified python version | ||
+ | <code>conda create -n myenv python=3.4</code> | ||
+ | On managing (python) environments with conda: https://conda.io/docs/user-guide/tasks/manage-environments.html | ||
+ | |||
+ | * **virualenv** is a python module installed using | ||
+ | <code>pip install --user virtualenv</code> | ||
+ | <code>virtualenv --python python3 env | ||
+ | source env/bin/activate</code> | ||
+ | some instructions: http://www.pythonforbeginners.com/basics/how-to-use-python-virtualenv |