When I run ./manage.py, I get the following error,
当我运行./manage.py时,我收到以下错误,
from: can't read /var/mail/os.path
from:无法读取/var/mail/os.path
./manage.py: line 4: import: command not found
./manage.py:line 4:import:命令未找到
./manage.py: line 7: syntax error near unexpected token `0,'
./manage.py:line 7:意外标记“0”附近的语法错误
./manage.py: line 7: `sys.path.insert( 0, abspath( join( dirname( file ), 'external_apps' ) ) )'
./manage.py:line 7:`sys.path.insert(0,abspath(join(dirname(file),'external_apps')))'
What is it!!! How can I resolve it?
它是什么!!!我该如何解决?
1 个解决方案
#1
1
Do not add #!/usr/bin/python . Use virtualenv and activate it before running python manage.py your_command . When you will be familiar with virtualenv try virtualenvwrapper.
不要添加#!/ usr / bin / python。使用virtualenv并在运行python manage.py your_command之前将其激活。当你熟悉virtualenv时,试试virtualenvwrapper。
#1
1
Do not add #!/usr/bin/python . Use virtualenv and activate it before running python manage.py your_command . When you will be familiar with virtualenv try virtualenvwrapper.
不要添加#!/ usr / bin / python。使用virtualenv并在运行python manage.py your_command之前将其激活。当你熟悉virtualenv时,试试virtualenvwrapper。