Re: [Tutor] env var packages
2013/5/15 vasya volk.vasi...@gmail.com Hi, Matthew First of all, please state what OS do you using? I think its ubuntu because some kind of this problem I've alredy solved some time ago: when I've need something like to add djando-admin.py to my PATH. What you need to do is to delete your django install that you make from easy_install and install django from package-manager that provide your system. How to delete is described here: https://docs.djangoproject.com/en/dev/topics/install/#remove-any-old-versions-of-django And how to install django depends from system to system... As I said specify it. For ubuntu it is apt-get install python-django. BTW installing packages from packet-manager the most common and the most clearly and best way to install. Do not try to clone it from git or tar.gz source code unless you what you do. Or try to use checkinstall (in ubuntu). About what djando-admin.py do. This is script file that generates simple structure of your future code, small enviroment like hello world in other programming languages. In some distributions (like ubuntu AFAIK) its also can start simple HTTP server for debugging your django project. On different systems there is also exists manage.py module which also do this (and this is common way that describes in books). Also it provides some interface to manipulate on different settings of your django project. To make simple hello world enviroment you should write in your terminal something like: django-admin startproject helloworld 2013/5/14 Matthew Ngaha chigga...@gmail.com i have to install django and ive come across some weird instructions. it says to set Django's django-admin.py file to my environment variable. I was instructed to get django via easy installer that was located in my Python/Scripts folder. it installed django to a different place in site-packages, where django-admin.py resides.But now its telling me to add this file to my env variable and it should also be located in Python/Scripts .. but as i've said, its clearly not there, it is somewhere in a site-packages/django sub folder. so is this an error? or do i go ahead and add Python/Scripts to the env variable, even those the file points somewhere else? My 2nd problem is it says after adding it i will get a python interpreter and Django's djando-admin.py commad up and running. What does this mean? both files open? it was specific about adding the path to the env variable, but if i already have python added, why do i need to add django? shouldnt it already be added? i will quote: You should make sure djando-admin.py is in your PATH environment variable so that it can be executed from the command-line (unless you like calling interpreters by using full pathnames) does this mean in a terminal, that i can be in Python/myproject/script_one/ and be able to open a .py file in Python/myproject/script_two/ by simpling typing its file name without having to cd into its directory or typing its full path? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor Sorry for top-post. Google mail make it by default... :-( ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] env var packages
Hi, Matthew First of all, please state what OS do you using? I think its ubuntu because some kind of this problem I've alredy solved some time ago: when I've need something like to add djando-admin.py to my PATH. What you need to do is to delete your django install that you make from easy_install and install django from package-manager that provide your system. How to delete is described here: https://docs.djangoproject.com/en/dev/topics/install/#remove-any-old-versions-of-django And how to install django depends from system to system... As I said specify it. For ubuntu it is apt-get install python-django. BTW installing packages from packet-manager the most common and the most clearly and best way to install. Do not try to clone it from git or tar.gz source code unless you what you do. Or try to use checkinstall (in ubuntu). About what djando-admin.py do. This is script file that generates simple structure of your future code, small enviroment like hello world in other programming languages. In some distributions (like ubuntu AFAIK) its also can start simple HTTP server for debugging your django project. On different systems there is also exists manage.py module which also do this (and this is common way that describes in books). Also it provides some interface to manipulate on different settings of your django project. To make simple hello world enviroment you should write in your terminal something like: django-admin startproject helloworld 2013/5/14 Matthew Ngaha chigga...@gmail.com i have to install django and ive come across some weird instructions. it says to set Django's django-admin.py file to my environment variable. I was instructed to get django via easy installer that was located in my Python/Scripts folder. it installed django to a different place in site-packages, where django-admin.py resides.But now its telling me to add this file to my env variable and it should also be located in Python/Scripts .. but as i've said, its clearly not there, it is somewhere in a site-packages/django sub folder. so is this an error? or do i go ahead and add Python/Scripts to the env variable, even those the file points somewhere else? My 2nd problem is it says after adding it i will get a python interpreter and Django's djando-admin.py commad up and running. What does this mean? both files open? it was specific about adding the path to the env variable, but if i already have python added, why do i need to add django? shouldnt it already be added? i will quote: You should make sure djando-admin.py is in your PATH environment variable so that it can be executed from the command-line (unless you like calling interpreters by using full pathnames) does this mean in a terminal, that i can be in Python/myproject/script_one/ and be able to open a .py file in Python/myproject/script_two/ by simpling typing its file name without having to cd into its directory or typing its full path? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] env var packages
On Tue, May 14, 2013 at 3:54 PM, Matthew Ngaha chigga...@gmail.com wrote: I was instructed to get django via easy installer that was located in my Python/Scripts folder. it installed django to a different place in site-packages, where django-admin.py resides. You appear to be using Windows, since you talk about a Scripts directory (other platforms use a bin directory such as /usr/bin). easy_install *should* have created django-admin.py in the Scripts directory. It worked for me on a fresh install of a 3.3.1, installing Django 1.5.1. Maybe the problem is minor, and you can just copy django-admin.py to the Scripts directory manually. If possible I'd start over fresh. Also, I'd use pip instead of easy_install. It's easier to uninstall with pip. If you decide to start fresh, first install Python, distribute, and pip; then add the Scripts directory to PATH; then run pip install django. Here are the scripts for installing distribute and pip: http://python-distribute.org/distribute_setup.py https://raw.github.com/pypa/pip/master/contrib/get-pip.py Use a command prompt with elevated privileges (i.e. Run as Administrator). it was specific about adding the path to the env variable, but if i already have python added, why do i need to add django? shouldnt it already be added? When you open (execute) a file without a full or relative path, the shell searches for the file in the directories listed in the PATH environment variable. Additionally, if you don't specify an extension, the cmd shell searches for the filename plus each extension listed in PATHEXT (e.g. .EXE, .BAT). The first match becomes the fully qualified path. Given a valid path, the shell executes the open command associated with the file's extension, which is found in the system registry under HKCR (classes root). Specifically, when you add the Scripts directory to PATH, it allows you to execute the files in that directory as commands, irrespective of your current working directory. Additionally if you add .PY to the PATHEXT environment variable, you can skip using the .py extension. For example, you would simply run django-admin. One limitation with this scheme is that the file type can only be configured for a particular executable at a time. It doesn't take into account, for example, having multiple Python interpreters installed on the same machine, all of which contend for the same .py extension. The new launcher for Windows (py.exe) gets around this problem by acting as a dispatcher based on the first line of the script (the shebang). The launcher is installed with 3.3 and available as a separate download for previous versions: https://bitbucket.org/pypa/pylauncher https://bitbucket.org/pypa/pylauncher/raw/tip/Doc/launcher.rst ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] env var packages
Thank you Vasya and Eryksun. Sorry i didn't mention my OS i am on windows. Thanks for the links and detailed explanations which after following, i now have django up and running! thanks again ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] env var packages
i have to install django and ive come across some weird instructions. it says to set Django's django-admin.py file to my environment variable. I was instructed to get django via easy installer that was located in my Python/Scripts folder. it installed django to a different place in site-packages, where django-admin.py resides.But now its telling me to add this file to my env variable and it should also be located in Python/Scripts .. but as i've said, its clearly not there, it is somewhere in a site-packages/django sub folder. so is this an error? or do i go ahead and add Python/Scripts to the env variable, even those the file points somewhere else? My 2nd problem is it says after adding it i will get a python interpreter and Django's djando-admin.py commad up and running. What does this mean? both files open? it was specific about adding the path to the env variable, but if i already have python added, why do i need to add django? shouldnt it already be added? i will quote: You should make sure djando-admin.py is in your PATH environment variable so that it can be executed from the command-line (unless you like calling interpreters by using full pathnames) does this mean in a terminal, that i can be in Python/myproject/script_one/ and be able to open a .py file in Python/myproject/script_two/ by simpling typing its file name without having to cd into its directory or typing its full path? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor