On Wed, Oct 28, 2009 at 2:49 PM, jakob <[email protected]> wrote: > > Hello everybody, > I run a virtual ubuntuserver and tried serveral ways to install > pylons. Everytime I ran into import problems. > I tried the virtual environment (/usr/local/lib/virt....). paster ... > returns error13 permission denied (because of /var/www/), and sudo > paster... returns "sudo: paster: command not found" > Next I just used easy_install Pylons = 0.9.6.2 and tried the same with > the -U option to update (I read this somewhere). Now I can create > projects with sudo (var/www/) but still run into "camt import from > pylons" problem. > Next I tried with building from source. (i actually did not remove the > older version) with hg clone (getting started on pylonshq). > I can create a project, but now the server cant start due to import > problems..... > > Next I set up the server again, installed from source, but now the > server just started one time, http://server:5000 does not display the > welcome message. I tried to restart the server (paster serve ...) but > noch i get "command.py:29 Deprecated ... Python 2.6... self.message = > message" > and line 125: same with : Variable assignment '^' invalid (no "=") > > Now I have a simple question. How to install (i prefer system wide > installation) Pylons??? What am I doing wrong? > I never got beyond the point of using static html pages (pylons book). > The template example (ch. 5) brought problems. > > I would realy like to use it.
First, don't create a project in /var/www. Create it in your home directory so you don't have these permission errors. Later when you're ready to put it in production, you can install it into a system directory. I can't follow exactly why it's happening, but it's a combination of write permission errors, the Python path being wrong (which would cause the import errors), and the system path being wrong (which would cause command not found errors). The "deprecated" error is surprising, but it could be cascading from the other errors (e.g., if it's using a different version of a library in another directory). Let us know if it keeps happening when you use Pylons in your own directory. For production, I create a wwwadmin user on the server and put the virtualenvs and Pylons applications in its home directory. Everything is group read for www-data (the user the webserver runs as, and which I run the Pylons applications as). The data directories are owned by www-data and group writeable by wwwadmin. I have a cron job to reset these permissions if they get messed up (e.g., by somebody scp'ing a file in). Second, don't install a system-wide Pylons if you're just starting out. Create a virtualenv and install Pylons in it. Pylons depends on so many packages, and any of them might need to be upgraded by the time you're ready for production. And different applications may need different versions of some libraries. Pylons is still to young to be sure you'll stick with the same versions of everything for several years. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
