1

I'm using Pydev with Eclipse on Mac. My python interpeter is macports python 2.6.

Right now the python package i'm working on is in my eclipse workspace, but the only way I can get my scripts to run is if I first install it into the macports 2.6 python site_packages folder. This means each time I make a code change I have to uninstall it, and then re-install it for my python interpreter to pick up the change.

How to I tell eclipse to tell python that {workspace}/mypythonporject should be part of the python path environment?

David Just
  • 288
  • 1
  • 4
  • 12

1 Answers1

2

Go to Window > Preferences > PyDev > Interpreter - Python. You should have an interpreter set up. If not, click New and browse to it.

Under Libraries, click New Folder and browse to the directory you want to include. Click Apply, let it build, and try again.

Edit: That is if you want to run the scripts THROUGH Eclipse.

If you want to run them from, say, the command line, you'll need to add the path to your PYTHONPATH environment variable.

TorelTwiddler
  • 5,996
  • 2
  • 32
  • 39
  • I was already doing that, however I was choosing a directory to low in the tree. Choosing the directory that contains the x.egg-info directory seems to work. – David Just Jul 18 '11 at 15:28