[Geany-Users] Use python virtualenvs in Geany

Sayth Renshaw flebber.crue at xxxxx
Mon Feb 3 09:48:42 UTC 2014


Thanks Enrico that does seem to work on the file I have

using bin/python "%f" and %p as my working directory.

I can't however get a working version of a /bin/sh -c %p/bin/activate;
python %f style virtualenv command. I have tried many versions but just
can't get it working. This one finds activate and the file but fails.

/bin/sh -c /home/sayth/Projects/Test/bin/activate; python file1.py (in
directory: /home/sayth/Projects/Test)
Traceback (most recent call last):
  File "file1.py", line 3, in <module>
    import django
ImportError: No module named django
Compilation failed.

Sayth




On Sun, Feb 2, 2014 at 10:02 PM, Enrico Tröger <enrico.troeger at uvena.de>wrote:

> On 02/02/14 01:12, Sayth Renshaw wrote:
> > OK using vanilla virtualenv(no wrapper) and with built in project from
> > geany I have ~/Projects/Test/bin/activate for virtualenv.
> >
> > The project is open and so %p as working directory works perfectly,
> however
> > it returns error on source /bin/sh:1 :source "not found.
> >
> > Updated the command to source bin/activate; python "%f" as thats the
> usual
> > command line activation. still same error.
>
> I'm afraid I wasn't clear enough about what I meant:
> Instead of using the 'bin/activate' script at all, just use the Python
> interpreter in the virtualenv's bin directory as this should know the
> paths already.
>
> Something like this could be your build command:
>
> %p/env/bin/python "%f"
>
> (provided that your virtualenv is called 'env' in the project directory)
>
> Regards,
> Enrico
>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>
>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20140203/b679304c/attachment.html>


More information about the Users mailing list