INCF / BrainImagingPipelines

BIPs
Other
28 stars 31 forks source link

Working with EPD and Virtualenv #52

Closed nicholsn closed 11 years ago

nicholsn commented 11 years ago

I'm running into an issue on a mac with 32-bit EPD working from a virtualenv. I think I've solved this but wanted to document it here. The issue comes up when trying to access pythonw.

(bips)nolan@MacBook:~ bips -l
This program needs access to the screen.
Please run with 'pythonw', not 'python', and only when you are logged
in on the main display of your Mac.

But sadly pythonw is not imported into the virtualenv. This is documented elsewhere and a potential fix is available, but needs a little tweek: https://github.com/gldnspud/virtualenv-pythonw-osx

By default the pythonw build generated from the above fix will match your system architecture, which for me is arch x86_64. However, I'm running 32-bit EPD which has better support than 64-bit for mac.

The fix is to edit install_pythonw.py line #100 and remove:

'-arch', 'x86_64',

Seems to be working now... Only catch is that I need to run bips w/pythonw explicitly.

pythonw /Users/nolan/.virtualenv/bips/bin/bips
satra commented 11 years ago

@nicholsn is this still true? i think we have tried to clean this one out.

nicholsn commented 11 years ago

@satra, with or w/o running the pythonw fix? I still get a prompt for pythonw... Using the EPD pythonw (w/o the fix) on a fresh install of nibabel, nipype, and the master branch of bips:

(bips)nolan@d-173-250-202-244:~/Downloads$ pythonw /Users/nolan/.virtualenv/bips/bin/bips
Traceback (most recent call last):
  File "/Users/nolan/.virtualenv/bips/bin/bips", line 67, in <module>
    main(args)
  File "/Users/nolan/.virtualenv/bips/bin/bips", line 30, in main
    from bips.workflows import (list_workflows, configure_workflow,
ImportError: No module named bips.workflows

unrelated error?

nicholsn commented 11 years ago

after adding "export ETS_TOOLKIT=qt4" this is now working with virtualenv