Pyramid framework settings in eclipse (aptana studio)

aptana studio 3 pyramid framework

How can i set up Pyramid Framework 1.3 in Eclipse or in Aptana Studio 3?

Sure, IDE is very important in software development(debugging, code assist, organize imports etc.). You can code python in editors, it is practical but diffucult for beginners.

Python and Django have eclipse plugin, there is no eclipse plugin for Pyramid Framework?

How i can run a Pyramid Project from Eclipse or Aptana Studio 3?

Steps :

1 – in Console : Create new pyramid 1.3.xx project :
On Linux:

   $ bin/pcreate -s alchemy MyProject

On Windows :

   > Scripts\pcreate -s alchemy MyProject

2 – Install your newly created project for development

   $ cd MyProject
   $ ../bin/python setup.py develop

On Windows :

   > cd MyProject
   > ..\Scripts\python.exe setup.py develop

3 – In Aptana Studio 3 : Create new PyDev project and give project content path as your Pyramid Project path

pydev

4 – For run configuration add a  pyramid_run variable in menu : Window > Preferences > in list PyDev – Interpreter – Python in tab String Substitution Variables – click Add variable and give key and value as in the screenshot below. On MS Windows select Scripts\pserve-script.py instead pserve.

pydev

5 – Add a run configuration in menu : Run -> Run Configuration on the left side on Python Run node Right Click : New Click and give run configuration settings and run.

pydev

pydev

6 – Your pyramid application runs on browser.

pydev

14 Comments

  1. Mehmet
    Jun 07, 2011 @ 13:35:22

    Super blog, very helpful

    Reply

  2. Volpe
    Jul 06, 2012 @ 18:44:23

    Hello!.. this blog is very helpfull for me!…

    and i have a question.. is possible to debug applications with the “–reload” param to pserve?

    Thnks!..

    Sorry for my bad english

    Reply

  3. Daniel
    Sep 06, 2012 @ 16:07:15

    Hola Cem Ikta,
    thanks very much for the great tutorial.
    I have a little problem though and maybe you have an idea if you would be so kind

    I am using: Python3.2, with virtualenv and Aptana Studio 3.2.2
    After configuring the Project and Interpreter as you’ve described I get an error on running the Project.

    Traceback (most recent call last):
    File “/Users/xxxxxx/Documents/pyramid/lib/python3.2/site-packages/distribute-0.6.28-py3.2.egg/site.py”, line 73, in
    __boot()
    File “/Users/xxxxxx/Documents/pyramid/lib/python3.2/site-packages/distribute-0.6.28-py3.2.egg/site.py”, line 38, in __boot
    raise ImportError(“Couldn’t find the real ‘site’ module”)
    ImportError: Couldn’t find the real ‘site’ module

    do you have an idea?

    Reply

    • Cem Ikta
      Sep 07, 2012 @ 14:40:32

      Hi Daniel,
      I have no idea. I have tried to use Pyramid with Python 3.x, but got a lot of problems. So I use Pyramid with Python 2.7.x.

      Reply

  4. shanky
    May 10, 2014 @ 13:02:40

    ” ./bin/python setup.py develop ” command not working.
    It says – bash: ../bin/python: No such file or directory

    Reply

  5. Rajani
    Jun 19, 2014 @ 12:35:45

    Hello Cem,
    Can you explain with a new post to integrate Solr into existing pyramid project in Eclipse using any python API modules to interface Python with Solr/

    Reply

    • Cem Ikta
      Jun 21, 2014 @ 00:31:09

      Hi Rajani,

      I haven’t used Apache Solr with Pyramid framework yet. I would like to write a blog post when I use.

      Reply

Leave a Reply to Bleno

Cancel