view raw
Eniac Eniac - 11 months ago 156
Python Question command not found (bluehost server)

After struggling more than 6 hours, I decided to ask for help.

Mission: To create a project with the help of Django

Tools: Windows Vista, Putty SSH

Location: Bluehost ( Server

I have already read these topics about the same question:

  1. -bash: command not found (Django Installation)

  2. Unable to use

  3. Django: When creating a new project, “ command not found” Error pops up

  4. command not found

  5. Command not found:

  6. not working ( command not found)

I have installed Python as explained here (Bluehost Help Page):

Python 2.7.2 installed and checked, and it looks like: [~/python]# ls
./ ../ Python-2.7.2/ Python-2.7.2.tgz bin/ include/ lib/ share/

the directory ~/python/Python-2.7.2/ looks like this: [~/python/Python-2.7.2]# ls
./ LICENSE Objects/ build/
../ Lib/ PC/ config.log python*
.hg_archival.txt Mac/ PCbuild/ config.status*
.hgtags Makefile Parser/ configure*
Demo/ Makefile.pre Python/
Doc/ README install-sh*
Grammar/ Misc/ RISCOS/ libpython2.7.a
Include/ Modules/ Tools/ pyconfig.h

and ~/python/bin/ looks like this: [~/python/bin]# ls
./ 2to3* idle* python* python2.7**
../* pydoc* python-config@ python2.7-config*

Django 1.5 installed and checked, and it looks like: [~/Django-1.5]# ls
./ AUTHORS LICENSE PKG-INFO build/ docs/ scripts/
../ INSTALL README.rst django/ extras/ setup.cfg tests/

and ~/Django-1.5/bin/ looks like this: [~/Django-1.5/django/bin]# ls
./* profiling/

Problem: When I try to create my project, I see this error: [~/www/domain/]# startproject mysite
-bash: command not found

Then I have tried again without .py, I see this error: [~/www/domain/]# startproject mysite
-bash: command not found

~/.bashrc looks like this:

# .bashrc
export PATH=$HOME/.local/bin:$HOME/.local/usr/bin:$PATH

#User specific aliases and functions

alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc

~/bin/ looks like this: [~/bin]# ls
./ ../

So I read a lot about the PATH, but I could not make it work. Should I give up?


Modify your .bashrc PATH entry to look like:

export PATH=$HOME/Django-1.5/bin/:$HOME/.local/bin:$HOME/.local/usr/bin:$PATH

And reload your .bashrc by doing:

# . ~/.bashrc