Skip to content

@satra /00README
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Installing EPD 7.0 + ETS on OSX x64 + virtualenv
Please note that this gist applies to EPD version 7.0 and 7.1. EPD 7.1 includes ETS
but not completely on OSX x64. Furthermore a patch has been submitted for inclusion
in virtualenv that should resolve the virtualenv issue.
The notes below were compiled for 7.0 and will need to be replaced with corresponding
7.1 paths.
https://github.com/satra/virtualenv/tree/fix/EPDpatch

OS X x64 EPD install with ETS and virtualenv

This is from a macbook pro running 10.6.6 in 64-bit boot mode.

Install EPD

Run the installer and then open terminal (this will invoke the EPD install)!

Install wx2.9 for python 2.7 into EPD

install from http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-2.9.1.1-cocoa-py2.7.dmg

patch postflight under '/Library/Receipts/wxPython2.9-osx-cocoa-py2.7.pkg/Contents/Resources/postflight':

8c8
< for dir in /usr/bin            /usr/local/bin            /Library/Frameworks/Python.framework/Versions/2.7/bin            /System/Library/Frameworks/Python.framework/Versions/2.7/bin /Library/Frameworks/EPD64.framework/Versions/7.0/bin; do
---
> for dir in /usr/bin            /usr/local/bin            /Library/Frameworks/Python.framework/Versions/2.7/bin            /System/Library/Frameworks/Python.framework/Versions/2.7/bin; do
29c29
< for dir in /Library/Python/2.7/site-packages            /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages /Library/Frameworks/EPD64.framework/Versions/7.0/lib/python2.7/site-packages; do
---
> for dir in /Library/Python/2.7/site-packages            /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages; do

then re-execute:

sudo sh /Library/Receipts/wxPython2.9-osx-cocoa-py2.7.pkg/Contents/Resources/postflight

Install PyQt and associated packages into EPD

Download and install Qt x64 from http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.7.1.dmg

Sip

download sip:

curl -O http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.3.tar.gz

patch siputils.py:

1437c1437
<             if "Python.framework" not in dl:
---
>             if not any([".framework" in value for value in dl]):

install sip:

python configure.py
make
make install

PyQt

download pyqt:

curl -O http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.8.4.tar.gz

install pyqt:

python configure.py
make
make install

QScintilla

download qscintilla:

curl -O   http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.5.1.tar.gz

install qscintilla:

cd Qt4
qmake qscintilla.pro -spec macx-g++
make
make install
cd ../Python
python configure.py
make
make install

Install VTK

This section assumes you know how to use CMake (cmake.org) and compile VTK using cmake and make.

download from http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz

configure VTK:

BUILD_SHARED_LIBS = ON
CMAKE_BUILD_TYPE = Release
VTK_USE_QT = ON
VTK_WRAP_PYTHON = ON

toggle to advanced mode (press t inside ccmake). on osx ccmake picks up the default system python library.:

PYTHON_LIBRARY to /Library/Frameworks/EPD64.framework/Versions/7.0/Python

compile and install. by default the python wrappers will be installed in /usr/local/lib/python2.7/site-packages/ so re-execute the python install:

make
make install
cd "Wrapping/Python" &&  /Library/Frameworks/EPD64.framework/Versions/Current/bin/python2.7   setup.py install

Install ETS

see ets download instructions at (needs git): http://code.enthought.com/source/

python ets.py setup install

Install virtualenvwrapper

install virtualenvwrapper http://www.doughellmann.com/projects/virtualenvwrapper/ and then uninstall virtualenv:

easy_install virtualenvwrapper
pip uninstall virtualenv

download virtualenv source from bitbucket (http://bitbucket.org/ianb/virtualenv)

patch virtualenv.py:

872,881c872,885
<     if 'Python.framework' in prefix:
<         logger.debug('MacOSX Python framework detected')
<
<         # Make sure we use the the embedded interpreter inside
<         # the framework, even if sys.executable points to
<         # the stub executable in ${sys.prefix}/bin
<         # See http://groups.google.com/group/python-virtualenv/
<         #                              browse_thread/thread/17cab2f85da75951
<         original_python = os.path.join(
<             prefix, 'Resources/Python.app/Contents/MacOS/Python')
---
>     if '.framework' in prefix:
>         if 'Python.framework' in prefix:
>             logger.debug('MacOSX Python framework detected')
>
>             # Make sure we use the the embedded interpreter inside
>             # the framework, even if sys.executable points to
>             # the stub executable in ${sys.prefix}/bin
>             # See http://groups.google.com/group/python-virtualenv/
>             #                              browse_thread/thread/17cab2f85da75951
>             original_python = os.path.join(
>                 prefix, 'Resources/Python.app/Contents/MacOS/Python')
>         if 'EPD' in prefix:
>             logger.debug('EPD framework detected')
>             original_python = os.path.join(prefix, 'bin/python')

install:

python setup.py install

OS X x64 EPD install with ETS and virtualenv

This is from a macbook pro running 10.6.6 in 64-bit boot mode.

Install EPD

Run the installer and then open terminal (this will invoke the EPD install)!

Install wx2.9 for python 2.7 into EPD

install from http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-2.9.1.1-cocoa-py2.7.dmg

patch postflight under '/Library/Receipts/wxPython2.9-osx-cocoa-py2.7.pkg/Contents/Resources/postflight':

8c8
< for dir in /usr/bin            /usr/local/bin            /Library/Frameworks/Python.framework/Versions/2.7/bin            /System/Library/Frameworks/Python.framework/Versions/2.7/bin /Library/Frameworks/EPD64.framework/Versions/7.0/bin; do
---
> for dir in /usr/bin            /usr/local/bin            /Library/Frameworks/Python.framework/Versions/2.7/bin            /System/Library/Frameworks/Python.framework/Versions/2.7/bin; do
29c29
< for dir in /Library/Python/2.7/site-packages            /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages /Library/Frameworks/EPD64.framework/Versions/7.0/lib/python2.7/site-packages; do
---
> for dir in /Library/Python/2.7/site-packages            /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages; do

then re-execute:

sudo sh /Library/Receipts/wxPython2.9-osx-cocoa-py2.7.pkg/Contents/Resources/postflight

Install PyQt and associated packages into EPD

Download and install Qt x64 from http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.7.1.dmg

Sip

download sip:

curl -O http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.3.tar.gz

patch siputils.py:

1437c1437
<             if "Python.framework" not in dl:
---
>             if not any([".framework" in value for value in dl]):

install sip:

python configure.py
make
make install

PyQt

download pyqt:

curl -O http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.8.4.tar.gz

install pyqt:

python configure.py
make
make install

QScintilla

download qscintilla:

curl -O   http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.5.1.tar.gz

install qscintilla:

cd Qt4
qmake qscintilla.pro -spec macx-g++
make
make install
cd ../Python
python configure.py
make
make install

Install VTK

This section assumes you know how to use CMake (cmake.org) and compile VTK using cmake and make.

download from http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz

configure VTK:

BUILD_SHARED_LIBS = ON
CMAKE_BUILD_TYPE = Release
VTK_USE_QT = ON
VTK_WRAP_PYTHON = ON

toggle to advanced mode (press t inside ccmake). on osx ccmake picks up the default system python library.:

PYTHON_LIBRARY to /Library/Frameworks/EPD64.framework/Versions/7.0/Python

compile and install. by default the python wrappers will be installed in /usr/local/lib/python2.7/site-packages/ so re-execute the python install:

make
make install
cd "Wrapping/Python" &&  /Library/Frameworks/EPD64.framework/Versions/Current/bin/python2.7   setup.py install

Install ETS

see ets download instructions at (needs git): http://code.enthought.com/source/

python ets.py setup install

Install virtualenvwrapper

install virtualenvwrapper http://www.doughellmann.com/projects/virtualenvwrapper/ and then uninstall virtualenv:

easy_install virtualenvwrapper
pip uninstall virtualenv

download virtualenv source from bitbucket (http://bitbucket.org/ianb/virtualenv)

patch virtualenv.py:

872,881c872,885
<     if 'Python.framework' in prefix:
<         logger.debug('MacOSX Python framework detected')
<
<         # Make sure we use the the embedded interpreter inside
<         # the framework, even if sys.executable points to
<         # the stub executable in ${sys.prefix}/bin
<         # See http://groups.google.com/group/python-virtualenv/
<         #                              browse_thread/thread/17cab2f85da75951
<         original_python = os.path.join(
<             prefix, 'Resources/Python.app/Contents/MacOS/Python')
---
>     if '.framework' in prefix:
>         if 'Python.framework' in prefix:
>             logger.debug('MacOSX Python framework detected')
>
>             # Make sure we use the the embedded interpreter inside
>             # the framework, even if sys.executable points to
>             # the stub executable in ${sys.prefix}/bin
>             # See http://groups.google.com/group/python-virtualenv/
>             #                              browse_thread/thread/17cab2f85da75951
>             original_python = os.path.join(
>                 prefix, 'Resources/Python.app/Contents/MacOS/Python')
>         if 'EPD' in prefix:
>             logger.debug('EPD framework detected')
>             original_python = os.path.join(prefix, 'bin/python')

install:

python setup.py install

$ export WORKON_HOME=/software/python/EPD/virtualenvs/7.0

$ mkdir /software/python/EPD/virtualenvs

$ mkdir /software/python/EPD/virtualenvs/7.0

$ source /software/python/EPD/7.0/bin/virtualenvwrapper.sh:

virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/initialize
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/premkvirtualenv
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/postmkvirtualenv
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/prermvirtualenv
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/postrmvirtualenv
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/predeactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/postdeactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/preactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/postactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/get_env_details

$ mkvirtualenv devpype:

New python executable in devpype/bin/python
Installing setuptools........................done.
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/devpype/bin/predeactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/devpype/bin/postdeactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/devpype/bin/preactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/devpype/bin/postactivate
virtualenvwrapper.user_scripts creating /software/python/EPD/virtualenvs/7.0/devpype/bin/get_env_details

to use the environment devpype (automatically activated by mkvirtualenv) but for other users they would just need to do:

source /software/python/EPD/virtualenvs/7.0/devpype/bin/activate
and then to turn off
deactivate

alternatively using virtualenvwrapper (put into bashrc)

export PATH=/software/python/EPD/7.0/bin:$PATH
export WORKON_HOME=/software/python/EPD/virtualenvs/7.0/
source /software/python/EPD/7.0/bin/virtualenvwrapper.sh

then in the terminal you can use virtualenvwrapper commands:

workon devpype
@ellisonbg

Anyone get this working with EPD 7.1?

@satra
Owner
@ellisonbg
@satra
Owner
@satra
Owner

posted a patch with the gist.

@ellisonbg
@ellisonbg
@dtlussier

Thanks for this - is this still a current fix for EPD 7.1?

@satra
Owner

this is still a fix, except for the fact that EPD 7.1 does provide a number of the ETS packages. a few notes:

  • you will have to uninstall using enpkg - Qt and PySide
  • the virtualenv patch though is in my github virtualenv fork. i haven't checked it in a while though.
  • you should get the latest versions of wx 2.9 for osx (although wxpython will complain and not run as it expects a framework build, which EPD 64 doe not appear to be) - so you will have to rely on Qt for any windowing.
@dtlussier

Ok - thanks.

@RanjitK

Hi I want to use mayavi with 64-bit EPD but I'm getting the following error when I import the module

Fatal Python error: PyThreadState_Get: no current thread
Abort trap

Any Suggestions?

@dtlussier
@RanjitK

Thanks for your reply. I will email on the enthought mailing list. It works fine with 32-bit EPD though. So
for now, I'm using that

@dtlussier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.