How to install which programs requires "sudo" in virtualenv?

Go To StackoverFlow.com

2

I'm trying to install kivy, in the docs it says:

$ sudo apt-get install python-setuptools python-pygame python-opengl \
  python-gst0.10 python-enchant gstreamer0.10-plugins-good cython python-dev \
  build-essential libgl1-mesa-dev libgles2-mesa-dev
$ sudo easy_install kivy

But I don't want to use sudo I like to keep my projects organized in virtualenv, so how install the requirements without using sudo. apt-get install won't work unless i use sudo. and i can't find the requirements in pip. Lets say i want to install easy_install in virtualenv for example, how to do that?

2012-04-03 22:31
by user


1

I do not think you can get around installing kivy's dependent packages without sudo/root access.

Once you have them installed, follow steps outlined in Andrew's answer.

2012-04-04 00:05
by BluesRockAddict


1

when you use virtualenv and start it running, you can use the easy_install / pip that is installed there. that doesn't require sudo because it installs directly to virtualenv.

in other words - it just works. have you tried it?

there's a simple example here http://www.arthurkoziel.com/2008/10/22/working-virtualenv/

  • sudo easy_install virtualenv (the last sudo you need)

  • virtualenv kivydir

  • source kivydir/bin/activate

  • easy_install kivy (installs to kivydir)

2012-04-03 22:52
by andrew cooke
Unfortunately that won't work as kivy has other dependent packages, so an attempt to run easy_install kivy within virtualenv will fail - BluesRockAddict 2012-04-03 23:56
oh, ok. thanks, now i see what the question was asking. eh - you could probably build them all by hand with custom paths, but life is too short :o( i'll leave this up since it's referenced in another answer - andrew cooke 2012-04-04 00:20
Ads