Pyinstaller Django: Can't find the file 'settings.py' in the directory containing...

557 views
Skip to first unread message

light-blue

unread,
Feb 24, 2012, 9:24:31 PM2/24/12
to PyInstaller
Disclaimer: I am new to python, django, and pyinstaller but have
programming experience in Drupal.

First, thanks for pyinstaller. It is wonderful!

Second, I recently started using django and now need to deploy the
app, but despite following the instructions (http://
www.pyinstaller.org/wiki/Recipe/DjangoApplication), I'm getting an
error which I can't resolve (below). To simplify, I created a brand
new project (django-admin.py startproject djsite), then followed said
instructions. The resulting errors on three platforms are below.

My other Pyinstaller (not django) attempts have worked perfectly.

Any ideas? Also, the path on the XP machine *does* include the site
mentioned in the error (C:\dropbox\diyebc\diy\djsite\)

On Windows XP:
==================
Error: Can't find the file 'settings.py' in the directory containing
'C:\\dropbox\\diyebc\\diy\\djsite\\manage.pyc'. It appears you've
customized things.
You'll have to run django-admin.py, passing it your settings module.

Traceback (most recent call last):
File "C:\dropbox\diyebc\diy\bootstrap.py", line 10, in <module>
import djsite.manage
File "C:\dropbox\diyebc\diy\djsite\manage.py", line 9, in <module>
sys.exit(1)
SystemExit: 1

On Windows 7:
=================
Error: Can't find the file 'settings.py' in the directory containing
'C:\\Python27\\djsite\\manage.pyc'. It appears you've customized
things.
You'll have to run django-admin.py, passing it your settings module.

Traceback (most recent call last):
File "C:\Python27\bootstrap.py", line 10, in <module>
import djsite.manage
File "C:\Python27\djsite\manage.py", line 9, in <module>
sys.exit(1)
SystemExit: 1
>>> quit
Use quit() or Ctrl-Z plus Return to exit

On Debian Linux:
=================
debug:/var/www/py# python bootstrap.py
Error: Can't find the file 'settings.py' in the directory containing '/
var/www/py/djsite/manage.py'. It appears you've customized things.
You'll have to run django-admin.py, passing it your settings module.

light-blue

unread,
Feb 25, 2012, 11:00:00 AM2/25/12
to PyInstaller
Just to clarify, especially by including all the logs I could find, I
am using python 2.7 and pywin32 for that build, which contain /
generated the following:

bootstrap.bat
==========
set PIP=c:\python27\pyinstaller15\
set myfile=bootstrap
python %PIP%Makespec.py --console --name=djsite bootstrap.py
python %PIP%Build.py djsite.spec

bootstrap.py
=========
import djsite.manage
djsite.manage.execute_manager(djsite.manage.settings,
['manage.py', 'runserver'])

bootstrap.bat and logdict2.7.2.final.0-1.log
===============================
(this file is REALLY long of course, so I've included a link to the
txt file instead of posting here)

http://dl.dropbox.com/u/22824199/deleteme/pyinstaller-googlegroups-question.txt
Reply all
Reply to author
Forward
0 new messages