Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tungpt247/d3b4780a8ca0ed834741dd8b37c3cb19 to your computer and use it in GitHub Desktop.
Save tungpt247/d3b4780a8ca0ed834741dd8b37c3cb19 to your computer and use it in GitHub Desktop.
python3.5 setup on Mac 10.11 (El Capitan)
/*
* To install all modules: pip3 install -r requirements.txt
*/
bokeh
Flask
ipython
jupyter
matplotlib
nose
numpy
pandas
Pillow
pymc
requests
scikit-image
scikit-learn
scipy
seaborn
six
statsmodel
textblob
theano
virtualenv
virtualenvwrapper
wordcloud

Install latest from github as these modules are not yet published
Their master branch works with Python3.5

Set your locale in an environment variable in ~/.bash_profile

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Type bash -l in your terimal to run the updated bash_profile.
Now, install the modules:

$ pip3 install git+git://github.com/cython/cython@master
$ pip3 install git+git://github.com/statsmodels/statsmodels
$ pip3 install git+git://github.com/pymc-devs/pymc3

Installing opencv3 with python3.5

$ brew tap homebrew/science
$ brew update && brew install opencv3 --with-contrib --with-python3
$ echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth
$ ln -s /usr/local/opt/opencv3/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so /usr/local/lib/python3.5/site-packages/cv2.so

You may have to export PYTHONPATH:

export PYTHONPATH=$PYTHONPATH:/usr/local/Cellar/opencv3/3.1.0/lib/python3.5/site-packages

Test:

$ python
In[1]: import cv2
In[2]: cv2.__version__
Out[2]: '3.0.0'

$ python3
In[1]: import cv2
In[2]: cv2.__version__
Out[2]: '3.0.0'
$ brew install llvm
$ brew link llvm --force
$ pip3 install numba

Test code from numba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment