mkvirtualenv doesn't install requirements

232 views
Skip to first unread message

Mikhail

unread,
Apr 25, 2012, 5:43:38 AM4/25/12
to virtualenvwrapper
Hellow :)

My problem is when I create a new enviroment with a command bellow, it
doesn't install any requirements automatically (but installs distribute
+pip as well). Here is the command:

'mkvirtualenv --no-site-packages myenvname -r /tmp/requirements.txt'

I'm using fresh virtualenvwrapper version from pypi.

Also, fabric says this command return code 1 (fatal error), but no
actual error message is displayed.

Of course there's alternative way: to enter inside a new enviroment
and run 'pip install -r ..' but I'd like to do a minimum of commands.
Any ideas how to fix this?

Doug Hellmann

unread,
Apr 25, 2012, 8:01:22 AM4/25/12
to virtuale...@googlegroups.com

On Apr 25, 2012, at 5:43 AM, Mikhail wrote:

> Hellow :)
>
> My problem is when I create a new enviroment with a command bellow, it
> doesn't install any requirements automatically (but installs distribute
> +pip as well). Here is the command:
>
> 'mkvirtualenv --no-site-packages myenvname -r /tmp/requirements.txt'
>
> I'm using fresh virtualenvwrapper version from pypi.
>
> Also, fabric says this command return code 1 (fatal error), but no
> actual error message is displayed.

So you are running the command via Fabric? Are you running it on a remote host? What output does it produce if you run it outside of Fabric?

Carl Karsten

unread,
Apr 25, 2012, 2:24:28 PM4/25/12
to virtuale...@googlegroups.com
On Wed, Apr 25, 2012 at 7:01 AM, Doug Hellmann <doug.h...@gmail.com> wrote:
>
> On Apr 25, 2012, at 5:43 AM, Mikhail wrote:
>
>> Hellow :)
>>
>> My problem is when I create a new enviroment with a command bellow, it
>> doesn't install any requirements automatically (but installs distribute
>> +pip as well). Here is the command:
>>
>> 'mkvirtualenv --no-site-packages myenvname -r /tmp/requirements.txt'
>>
>> I'm using fresh virtualenvwrapper version from pypi.
>>
>> Also, fabric says this command return code 1 (fatal error), but no
>> actual error message is displayed.
>
> So you are running the command via Fabric? Are you running it on a remote host? What output does it produce if you run it outside of Fabric?
>

long shot: it is failing because sine script has a line that errors,
but the shell (bash?) is normally set to just keep going. so like you
can "mkdir foo" and if foo exists, oh well, keep going. but if fabric
turns on 'exit on error' then the script will exit and fabric will
report an error.

I ran into this, patched it, couldn't get the unit tests to run, so
gave up trying to submit it. I see the unit test issue has been
closed, will try and get back to this some time. but for now, here is
my patch that may fix the fabric problem:

https://bitbucket.org/CarlFK/virtualenvwrapper/compare/..dhellmann/virtualenvwrapper

--
Carl K

Toby Champion

unread,
Apr 25, 2012, 9:31:31 AM4/25/12
to virtuale...@googlegroups.com
I'd suggest leaving mkvirtualenv to do what it's best at, and just use
the two commands.

Does mkvirtualenv even have the -r option? My version doesn't.

Doug Hellmann

unread,
May 4, 2012, 9:24:13 AM5/4/12
to virtuale...@googlegroups.com
[Sorry for the delay in moderating this post through to the list!]

On Apr 25, 2012, at 9:31 AM, Toby Champion wrote:

> I'd suggest leaving mkvirtualenv to do what it's best at, and just use the two commands.
>
> Does mkvirtualenv even have the -r option? My version doesn't.

Yes, it's relatively new, though.
Reply all
Reply to author
Forward
0 new messages