Re: Dreamhost Virtualenv Question
A few more important things to note: Your projects shouldn't live within your virtualenv directory. You can create projects and virtualenvs with the same name (I often do), but it's not mandatory. So here's an example setup ~/virtual/djangotrunk ~/virtual/socialwebzone ~/projects/socialwebzone ~/projects/polls ~/projects/csvimporter The projects listed can run in any of the virtual environments, although their behavior would probably vary (for example, if you have django 1.1 in ~/virtual/socialwebzone). What you *must do* is customize the PYTHONPATH variable upon activating an environment. This can be done in many ways. For example, by manually editing the activate script[1] in each virtualenv. Or, if using virtualenvwrapper[2], by creating a postactivate hook script[3]. This is where having the same name for a project and virtualenv can come in handy, because then you can programatically add ~/projects/ to the PYTHONPATH. Cheers, André Terra [1] example activate script on windows (not perfect): http://dpaste.com/hold/564313/ [2] http://www.doughellmann.com/docs/virtualenvwrapper/index.html [3] http://www.doughellmann.com/docs/virtualenvwrapper/scripts.html#postactivate On Wed, Jul 6, 2011 at 7:18 AM, DrBloodmoneywrote: > On Wed, Jul 6, 2011 at 3:31 AM, i...@webbricks.co.uk > wrote: > > oh yeah > > > http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ > > > > that page is my goto reference on building a virtualenv, you might > > have already found it, but if not... > > > > On Jul 5, 10:28 pm, Jeremy wrote: > >> AHHH, that makes a little more sense. I'm trying to install apps from > >> Github. Things like Pinax, and different individual blogging apps so > >> that I can "plug" them into one Django project to give it multiple > >> bits of social functionality. Obviously I'm having a lot of trouble > >> (some of it being that it sounds like I don't even know what I'm > >> saying). I've tried to install these apps through PIP and other forms > >> on Dreamhost, but it keeps saying that I don't have permission. The > >> way that I believed to get around this is to set up virtualenv on my > >> shared server space, and create the project inside of that, correct? > >> But if I do this, how can I view the project that I creating live? > >> > >> Again, if this all sounds foolish, keep in mind I'm incredibly new to > >> all these concepts and my not understand them enough. I've been > >> looking for someone locally to give me some Django lessons, but I keep > >> coming up dry. > >> > >> Let me know if anyone can assist me. Thanks guys. > >> > > The two most important things to concern yourself with regarding > starting developing with virtualenv (which is a must): > > - source /path/to/venv/bin/activate: this command tells the shell > (bash, zsh, etc) to use the python interpreter located at > /path/to/venv/bin/python instead of the system python interpreter (eg. > /usr/bin/python) > > - the pythonpath for your virtualenv is going to be > /path/to/venv/lib/python/site-packages. I usually maintain a separate > directory containing packages I need (either at ~/libraries for global > libraries, third-party apps, etc on my dev box) and > /path/to/venv/libraries on production boxes. Then I symlink python > modules that I need to the /path/to/venv/lib/python/site-packages > directory. Then they'll be on your PYTHONPATH. > > The above applies to developing on a *nix box. If you are developing > on windows, stop what you are doing and install virtualbox and ubuntu > or go fully over to a *nix box. You'll appreciate it this. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
On Wed, Jul 6, 2011 at 3:31 AM, i...@webbricks.co.ukwrote: > oh yeah > http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ > > that page is my goto reference on building a virtualenv, you might > have already found it, but if not... > > On Jul 5, 10:28 pm, Jeremy wrote: >> AHHH, that makes a little more sense. I'm trying to install apps from >> Github. Things like Pinax, and different individual blogging apps so >> that I can "plug" them into one Django project to give it multiple >> bits of social functionality. Obviously I'm having a lot of trouble >> (some of it being that it sounds like I don't even know what I'm >> saying). I've tried to install these apps through PIP and other forms >> on Dreamhost, but it keeps saying that I don't have permission. The >> way that I believed to get around this is to set up virtualenv on my >> shared server space, and create the project inside of that, correct? >> But if I do this, how can I view the project that I creating live? >> >> Again, if this all sounds foolish, keep in mind I'm incredibly new to >> all these concepts and my not understand them enough. I've been >> looking for someone locally to give me some Django lessons, but I keep >> coming up dry. >> >> Let me know if anyone can assist me. Thanks guys. >> The two most important things to concern yourself with regarding starting developing with virtualenv (which is a must): - source /path/to/venv/bin/activate: this command tells the shell (bash, zsh, etc) to use the python interpreter located at /path/to/venv/bin/python instead of the system python interpreter (eg. /usr/bin/python) - the pythonpath for your virtualenv is going to be /path/to/venv/lib/python/site-packages. I usually maintain a separate directory containing packages I need (either at ~/libraries for global libraries, third-party apps, etc on my dev box) and /path/to/venv/libraries on production boxes. Then I symlink python modules that I need to the /path/to/venv/lib/python/site-packages directory. Then they'll be on your PYTHONPATH. The above applies to developing on a *nix box. If you are developing on windows, stop what you are doing and install virtualbox and ubuntu or go fully over to a *nix box. You'll appreciate it this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
Jeremy, there's a concept you need to understand to progress here. its on that took me while to properly understand, but which i think is natural to someone in a foss development role, which i hadn't previously been. the python path is the all important config item. it defines where python look sfor modules. its important because if you "pip install django-zinnia -E envname" then you'll install the module to the site- packages directory inside djangos modules. however its also (usually? someone correct me if im wrong) equally valid to download the source, read through the docco and then copy the module to the root of your site ("envname/projectname"). you'll need to import the module manually where you need to use it, but you'll have worked that out already. any help? On Jul 5, 10:28 pm, Jeremywrote: > AHHH, that makes a little more sense. I'm trying to install apps from > Github. Things like Pinax, and different individual blogging apps so > that I can "plug" them into one Django project to give it multiple > bits of social functionality. Obviously I'm having a lot of trouble > (some of it being that it sounds like I don't even know what I'm > saying). I've tried to install these apps through PIP and other forms > on Dreamhost, but it keeps saying that I don't have permission. The > way that I believed to get around this is to set up virtualenv on my > shared server space, and create the project inside of that, correct? > But if I do this, how can I view the project that I creating live? > > Again, if this all sounds foolish, keep in mind I'm incredibly new to > all these concepts and my not understand them enough. I've been > looking for someone locally to give me some Django lessons, but I keep > coming up dry. > > Let me know if anyone can assist me. Thanks guys. > > On Jul 5, 3:26 pm, bruno desthuilliers > wrote: > > > > > > > > > I can only second Shawn here. FWIW, virtualenv is just a way to have > > different (more or less) isolated *Python* environments on a same > > system, and has no notion of a "Django project". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
oh yeah http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ that page is my goto reference on building a virtualenv, you might have already found it, but if not... On Jul 5, 10:28 pm, Jeremywrote: > AHHH, that makes a little more sense. I'm trying to install apps from > Github. Things like Pinax, and different individual blogging apps so > that I can "plug" them into one Django project to give it multiple > bits of social functionality. Obviously I'm having a lot of trouble > (some of it being that it sounds like I don't even know what I'm > saying). I've tried to install these apps through PIP and other forms > on Dreamhost, but it keeps saying that I don't have permission. The > way that I believed to get around this is to set up virtualenv on my > shared server space, and create the project inside of that, correct? > But if I do this, how can I view the project that I creating live? > > Again, if this all sounds foolish, keep in mind I'm incredibly new to > all these concepts and my not understand them enough. I've been > looking for someone locally to give me some Django lessons, but I keep > coming up dry. > > Let me know if anyone can assist me. Thanks guys. > > On Jul 5, 3:26 pm, bruno desthuilliers > wrote: > > > > > > > > > I can only second Shawn here. FWIW, virtualenv is just a way to have > > different (more or less) isolated *Python* environments on a same > > system, and has no notion of a "Django project". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
AHHH, that makes a little more sense. I'm trying to install apps from Github. Things like Pinax, and different individual blogging apps so that I can "plug" them into one Django project to give it multiple bits of social functionality. Obviously I'm having a lot of trouble (some of it being that it sounds like I don't even know what I'm saying). I've tried to install these apps through PIP and other forms on Dreamhost, but it keeps saying that I don't have permission. The way that I believed to get around this is to set up virtualenv on my shared server space, and create the project inside of that, correct? But if I do this, how can I view the project that I creating live? Again, if this all sounds foolish, keep in mind I'm incredibly new to all these concepts and my not understand them enough. I've been looking for someone locally to give me some Django lessons, but I keep coming up dry. Let me know if anyone can assist me. Thanks guys. On Jul 5, 3:26 pm, bruno desthuillierswrote: > I can only second Shawn here. FWIW, virtualenv is just a way to have > different (more or less) isolated *Python* environments on a same > system, and has no notion of a "Django project". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
I can only second Shawn here. FWIW, virtualenv is just a way to have different (more or less) isolated *Python* environments on a same system, and has no notion of a "Django project". -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
On Tue, Jul 5, 2011 at 2:10 PM, Jeremywrote: > Hello, I'm completely new to Django and the concept of virtualenv. > I'm trying to set up a web site and add in third party applications > such as the zinnia blogging app, but having some issues. I believe > that I've set up the virtualenv correctly, but could someone walk me > through detailed steps as to install a third party app in the > virtualenv, then VIEW this virtualenv project as a webpage in a > browser? Forgive me if I'm speaking non-sense, but I really need help > with this. Thank you. > Please define "third party app" and "virtualenv project." You can install a Python package in virtualenv using pip. "Viewing a virtualenv project as a webpage" is nonsense. I could guess at what you mean, but if you can clarify a bit it would help. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Dreamhost Virtualenv Question
Take a look to this article i wrote a couple of months ago blog.oscarcp.com/?p=167 its about installing django 1.3 on dreamhost, it may help you Enviado desde mi HTC El 05/07/2011 20:13, "Jeremy"escribió: > Hello, I'm completely new to Django and the concept of virtualenv. > I'm trying to set up a web site and add in third party applications > such as the zinnia blogging app, but having some issues. I believe > that I've set up the virtualenv correctly, but could someone walk me > through detailed steps as to install a third party app in the > virtualenv, then VIEW this virtualenv project as a webpage in a > browser? Forgive me if I'm speaking non-sense, but I really need help > with this. Thank you. > > -- > You received this message because you are subscribed to the Google Groups "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Dreamhost Virtualenv Question
Hello, I'm completely new to Django and the concept of virtualenv. I'm trying to set up a web site and add in third party applications such as the zinnia blogging app, but having some issues. I believe that I've set up the virtualenv correctly, but could someone walk me through detailed steps as to install a third party app in the virtualenv, then VIEW this virtualenv project as a webpage in a browser? Forgive me if I'm speaking non-sense, but I really need help with this. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.