<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 2 February 2014 12:29, Sayth Renshaw <span dir="ltr"><<a href="mailto:flebber.crue@gmail.com" target="_blank">flebber.crue@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">/bin/bash -c source .bin/activate; python file1.py (in directory: /home/sayth/Projects/Test)<br>.bin/activate: line 0: source: filename argument required<br>
source: usage: source filename [arguments]<br>Traceback (most recent call last):<br>
  File "file1.py", line 3, in <module><br>    import django<br>ImportError: No module named django<br>Compilation failed.<br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br></div>
</div></div></blockquote><div><br></div><div>Please post errors correctly, your first error seemed to say "source" was not found.</div><div><br></div><div>This error is saying source is ok, just that the path to your actiavte script is wrong.  it should be ./bin/activate I think.</div>
<div><br></div><div>Cheers</div><div>Lex</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><div class="gmail_quote">On Sun, Feb 2, 2014 at 11:47 AM, Lex Trotman <span dir="ltr"><<a href="mailto:elextr@gmail.com" target="_blank">elextr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On 2 February 2014 11:12, Sayth Renshaw <span dir="ltr"><<a href="mailto:flebber.crue@gmail.com" target="_blank">flebber.crue@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>OK using vanilla virtualenv(no wrapper) and with built in project from geany I have ~/Projects/Test/bin/activate for virtualenv.<br>


<br></div>The project is open and so %p as working directory works perfectly, however it returns error on source /bin/sh:1 :source "not found.<br></div></div></div></div></blockquote><div><br></div></div><div>Since its executed as /bin/sh, bash run by Geany is probably in Bourne shell mode, and so you need to use the . command.  source is a bash alias for that, see <a href="http://www.gnu.org/software/bash/manual/bashref.html#Shell-Builtin-Commands" target="_blank">http://www.gnu.org/software/bash/manual/bashref.html#Shell-Builtin-Commands</a>.</div>


<div><br></div><div>The bash in your command line is probably in bash mode and recognises source.</div><div><br></div><div>Cheers</div><span><font color="#888888"><div>Lex</div></font></span><div><div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div><div>
<br></div>Updated the command to source bin/activate; python "%f" as thats the usual command line activation. still same error.<br><br></div>So it doesn't seem to activate, the command works ok in the terminal <br>



<br><br></div><div>Launching from a terminal with venv active does seem to work.<br><br><br></div>Sayth<br><div><div><div><div><div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">



On Sat, Feb 1, 2014 at 11:56 PM, Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de" target="_blank">enrico.troeger@uvena.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div>On 01/02/14 00:58, Sayth Renshaw wrote:<br>
> Thanks for the help. I use virtualenvwrapper and am comfortable with it.<br>
><br>
> Will just start from with env at moment and play with the build commands.<br>
><br>
> Perhaps I was over thinking it.<br>
<br>
</div>I don't use virtualenvwrapper and so don't know it very much. I<br>
personally rather like to work with virtualenv directly,<br>
virtualenvwrapper always caused me more troubles than it solved.<br>
<br>
That said and putting virtualenvwrapper aside, it should be quite easy:<br>
create a project in Geany per virtualenv and adjust the build commands.<br>
Without having tested it, it should be sufficient to just use the Python<br>
executable from the bin directory of the corresponding virtualenv as<br>
this interpreter executable already knows about the paths. No sure how<br>
this works but it does. This way you can save you the hassle of<br>
activating the virtualenv.<br>
As said, I didn't test it, but I use the 'specific python executable'<br>
trick on production machines to start cronjobs and other management<br>
commands in some Django projects.<br>
<br>
Regards,<br>
Enrico<span><font color="#888888"><br>
<span><font color="#888888"><br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
<br>
</font></span><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org" target="_blank">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></font></span></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org" target="_blank">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org" target="_blank">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>