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?

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.