Question

I'm starting out with the Pyramid framework and trying to run this inside of Eclipse.

My run configuration is:

Main Module: /home/ben/env/bin/paster

Program Arguments: serve /home/ben/dev/python/pyramid/firstPyramid/first/development.ini

This virtualenv paster will serve development.ini fine from the command line. However, running this in eclipse gives:

[Invalid file specified for console output: ]
Traceback (most recent call last):  
  File "/home/ben/env/bin/paster", line 8, in <module>  
    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()  
  File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run  
    invoke(command, command_name, options, args[1:])  
  File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke  
    exit_code = runner.run(args)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run  
    result = self.command()  
  File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 276, in command  
    relative_to=base, global_conf=vars)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 313, in loadapp  
    **kw)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 203, in loadapp  
    return loadobj(APP, uri, name=name, **kw)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 223, in loadobj  
    global_conf=global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext  
    global_conf=global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 270, in _loadconfig  
    return loader.get_context(object_type, name, global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 397, in get_context  
    global_additions=global_additions)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 492, in _pipeline_app_context  
    APP, pipeline[-1], global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 401, in get_context  
    section)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 423, in _context_from_use  
    object_type, name=use, global_conf=global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 353, in get_context  
    global_conf=global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext  
    global_conf=global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 277, in _loadegg  
    return loader.get_context(object_type, name, global_conf)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 553, in get_context  
    object_type, name=name)  
  File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 573, in find_egg_entry_point  
    pkg_resources.require(self.spec)  
  File "/home/ben/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 666, in require  
  File "/home/ben/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 565, in resolve  
pkg_resources.DistributionNotFound: MyProject  

I also have PyDev using the python interpreter of the virtualenv setup.

Any ideas what may be the issue?

Here is a screenshot: screen capture

Was it helpful?

Solution

I fixed this by changing the PYHTONPATH property in pydev to also use env/bin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top