Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a PasteScript error when I try to serve an existing Pylons app

I'm trying to serve an existing Python 2.5 Pylons application on OS X Snow Leopard.

I've already installed Python 2.5 and set it as the default Python installation, installed paster, and installed the version of Pylons the app needs (0.9.6.1) as well as other eggs... but when I cd to the main folder and do "paster serve development.ini" I get the following:

File "/usr/local/bin/paster", line 5, in <module>
    from pkg_resources import load_entry_point

File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 2603, in <module>

File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 666, in require

File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 565, in resolve

pkg_resources.DistributionNotFound: PasteScript==1.7.3

I definitely have done "easy_install PasteScript==1.7.3" and I still get this error. Is there something really obvious I'm missing? Help?

Thanks in advance.

like image 628
Sarah Avatar asked Nov 05 '22 06:11

Sarah


1 Answers

You probably have multiple Python installs on your system. The easy_install command probably installed PasteScript into a different Python interpreter. You may have a specific easy_install-2.5 command that you should use instead for the Python 2.5 interpreter.

However, using virtualenv on your development system is strongly recommended.

Virtualenv allows you to create a sandbox bound to a specific Python interpreter, and where you can install specific packages versions locally based the on each project.

More information on using virtualenv with Pylons here: http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox

like image 167
ronnix Avatar answered Nov 11 '22 03:11

ronnix