Hi, Thank you very much for your quick reply. I got it pretty much right after you wrote it yesterday... I figured I'd get it working first, then reply with my results for everyone's benefit. :) Alas, it really took all day yesterday, a good night's rest and then getting a fresh start with a fresh mind this morning.
And I got it working. What I did after many false starts, syntax errors and 1+hr of phone time with my linux host, (1&1 if it helps anyone): First, my sources: a. djangobooks.com (chapter2), b. djangoproject.com/documentation/install c. this thread, and d. the Site5 thread -- I first wiped out everything to start over as per djangoproject.com -- Installed virtual-python as per Site5. That created my own locally accessed /bin and /lib files (containing python [use "~/bin/python" to get to >>>] and a /site-packages file). -- Downloaded then installed Django tar.gz* -- Performed import commands. It worked!* -- Finally figured out what everyone means by setting a path: The goal is to take the Django path (/yoursite/Django-0.96/django/bin/django- admin.py) and drop a kind of "bookmark" to it into /lib/python2.4/site- packages. Why? Because ~/bin/python uses /lib/python2.4 where /site- packages resides. Site-packages has a list of paths (the "bookmarks") it will look for stuff you're working with. By dropping a path to your Django-0.96 file into the /lib's site-packages, you're telling it where to look for your Django. THAT is what you are doing. So after you put the path in there, that's all you do for that. -- Lastly, I created a directory called "projects". I "cd" into that and ran command: "django-admin.py startproject mysite" and it created the /mysite file under /projects. And all the files were there as predicted in djangobooks. *Trial and error in case others have the same problems: -- "sudo" doesn't work for me. I just omitted it from the command lines. -- ln -s commands get me "permission denied" even within my own folders. My host did one for me, but it took 40 minutes. -- I don't think $'s worked in anything I used. -- This didn't work: >>>import django >>>import.VERSION (in any form) I had to: >>>import django >>>django -- and I think there may have been a couple of other examples where the recommended syntax didn't work as written for my particular instance. There were quite a few irksome snags that I ran into yesterday that made it difficult to understand what was happening. It was like being in a 1/4mile maze for the first time and not recognizing a correct turn while on the 8th mile of going the wrong way. But now that I'm through, I see the solution thanks to the patience and generous help of people who take the time to write answers for confused people. :) Thanks!!!!! I can't wait to now dive in and see what django is all about. :) On Apr 6, 12:53 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I just sent a reply, but I guess I don't know how to use Google groups > > so well (sorry). I think it went directly to the author instead of > > posting here. > > Yes indeed, it did go directly to me :) > > > Basically I don't understand Tim's answer and could it > > be explained a bit more? > > I'll see what I can do. For the others on the list, I also got > the following via direct email: > > > Hi, I am a complete moron. Will you translate this into English? ;) > > > What do you mean by $PYTHONPATH and how do you "include" something? > > PYTHONPATH is an optional environment variable that instructs > Python where to look for modules to load. If it's not set, > Python uses a select few places that can be shown by issuing > > bash$ python > [copyright info] > >>>importsys > >>> sys.path > [output of all the places Python looks for modules that can be > "import"ed] > > You can set your PYTHONPATH first: > > bash$ export PYTHONPATH=/path/to/someplace/not/in/sys.path/ > bash$ python > [copyright info] > >>>importsys > >>> sys.path > [output of all the places Python looks for modules that can be > "import"ed which should now include "/path/to/..." which I > believe falls at the beginning of the list] > > Djangois just a Python module (or group of modules), so the > "installation" just involves putting the contents someplace in > the sys.path. If you run the default install as an admin,Django'sfiles get > dropped in the system-wide Python module > repository. For me here, that's likely > /usr/lib/python2.4/site-packages/ but may vary depending on your > setup/OS. > > If you're not the administrator (or, like me, you want to install > various versions ofDjangoand flip between them), you can just > so something like the following, choosing case #1 or #2 depending > on what tools you have access to: > > bash$ cd ~/code > 1 bash$ # if you have subversion installed: > 1 bash$ svn cohttp://code.djangoproject.com/svn/django/trunk/django > 2 bash$ # if you don't have subversion installed, but have a .tgz > 2 bash$ # snapshot ofDjango > 2 bash$ tar xvfzdjango.tgz > bash$ export PYTHONPATH=~/code/django > bash$ python > [copyright info] > >>>importdjango > [if all went well, no traceback here] > > The secondary problem is that PYTHONPATH needs to be set every > time a new environment is launched. In the above example, that > means that if you log out and log back in again, you have to set > PYTHONPATH again. For interactive work, you can set PYTHONPATH > in your .bashrc/.profile startup file so it gets set every time > you log in. > > However, in a mod_python (and likely mod_wsgi, fastcgi, or > lighttpd setup) you need to use the config-option du-jour to tell > your hosting where to findDjangoand where to find your project: > > http://www.djangoproject.com/documentation/modpython/ > > Thus, you might need your apache config to have a line like > > PythonPath ['/home/snoop/code/django', > '/home/snoop/code/myproj'] + sys.path > > so that mod_python can find bothDjango'ssource/modules, and > your own code in your ~/code/myproj directory. > > > So I went to run the installation again to keep a keen eye on what was > > happening, but THIS time it's saying "permission denied" (that didn't > > happen before). > > I'm guessing that since you're a non-root user, you don't have > rights to putDjango'smodules in the site-wide directory. > > > Searching the net for an answer, this one is the closest that > > resembles my issue. But I do not understand your answer. > > So you need to instruct the setup to install some place that you > *can* write (I don't know exactly how to do this, but I'm sure > one of the many other smart folks on the list will leap in here > with the right option to pass to setup.py) which would be > something like > > python setup.py --base=/home/snoop/code/djangoinstall > > or, as above, you can install the development version either from > Subversion or, if you have SVN on another machine, you can check > it out there and then push a tar-ball down to the server, > un-tar/gzipping there. > > This still all assumes that your webhost has support for runningDjango(either > mod_python, mod_wsgi, or some other supported > non-CGI variant) > > > Thanks. > > Hope this helps. For the list archive purposes, I've included my > original email that papertrail included. > > -tim > > > On Feb 27, 9:15 am, Tim Chase <[EMAIL PROTECTED]> wrote: > >>> I am new todjango(coming from ruby on rails) and I want to setup a > >>>djangoapplication on a free webhost. > >> A free webhost that allowsDjango? Even if it's fairly limited, > >> this is interesting. Can you tell more? > > >>> I have ssh access and executed > >>> the install scriped. But I am not allowed to write in the /usr/ > >>> folder, is there any way to installdjangowithout writing in the / > >>> usr/ folder ? > >>> Here is the Error : > >>> creating /usr/lib/python2.3/site-packages/django > >>> error: could not create '/usr/lib/python2.3/site-packages/django': > >>> Permissiondenied > >>Djangodoesn't need to be installed...it merely needs to be in > >> your $PYTHONPATH environment. Thus, you can simply copy the > >>Djangofiles (or do aDjangocheckout from the SVN repo) into > >> some place in your home directory, and then configure your > >> deployment to include that directory in your $PYTHONPATH. You > >> omit the details of what your server is (Apache? lighttpd?) so > >> the particulars of this vary. However, the basic gist would be > >> to do something like > > >> cd ~ > >> tar xvfzdjango-0.96.tgz > > >> and then include /home/snoop/django-0.96 in your $PYTHONPATH > > >> or, if you want the development head and subversion is installed > >> on your host (if so, I'm *really* interested in this free host): > > >> cd ~ > >> svn cohttp://code.djangoproject.com/svn/django/trunk/ > >>django-trunk > > >> and include /home/snoop/django-trunk in your $PYTHONPATH. > > >> -tim --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---