jadbox / brackets-integrated-development

IDE-like support for Brackets
49 stars 7 forks source link

using external Python frameworks #18

Open basbebe opened 9 years ago

basbebe commented 9 years ago

I'm trying to develop a small Python app with the CherryPy framework. I'm installing with homebrew on a Mac. however, integrated development doesn't find the module:

ImportError: No module named cherrypy

Running from the terminal does work.

And: Is there a way to make integrated development work with virtual environments like virtualenv or pyvenv?

GiovanniCardamone commented 7 years ago

i have the same issue, did you solve?

basbebe commented 7 years ago

no – I switched to another solution…

azariz commented 7 years ago

With VirtualEnv, You can simply add a pre-command to enable your env before executing the main script/file.

In builder.json (extension settings):

Replace :

{
        "name": "Python",
        "cmd": "python $FILE",
        ...
},

With :

{
        "name": "Python",
        "cmd": "source ./venv/bin/activate && python $FILE",
        ...
},

./venv is your virtualenv folder