2016-06-15 13 views
0

pyinstallerを使用してdjango Webアプリケーションをコンパイルしようとしています。 は、私は以下のコマンドを使用:だからpyinstaller&django OSError:[Errno 2]そのようなファイルやディレクトリがありません

[[email protected] zhaobiao]# find . -iname 'migrations' 
./django/contrib/admin/migrations 
./django/contrib/auth/migrations 
./django/contrib/sessions/migrations 
./django/contrib/sites/migrations 
./django/contrib/redirects/migrations 
./django/contrib/contenttypes/migrations 
./django/contrib/flatpages/migrations 
./django/conf/app_template/migrations 

:私は、次の位置に移行ディレクトリを見つけるその後

[[email protected] zhaobiao]# ./dist/zhaobiao/zhaobiao runserver 0.0.0.0:8000 
Performing system checks... 

System check identified no issues (0 silenced). 
Unhandled exception in thread started by <function wrapper at 0x7f5220297410> 
Traceback (most recent call last): 
    File "site-packages/django/utils/autoreload.py", line 226, in wrapper 
    File "site-packages/django/core/management/commands/runserver.py", line 117, in inner_run 
    File "site-packages/django/core/management/commands/runserver.py", line 163, in check_migrations 
    File "site-packages/django/db/migrations/executor.py", line 20, in __init__ 
    File "site-packages/django/db/migrations/loader.py", line 49, in __init__ 
    File "site-packages/django/db/migrations/loader.py", line 170, in build_graph 
    File "site-packages/django/db/migrations/loader.py", line 98, in load_disk 
OSError: [Errno 2] No such file or directory: '/root/Downloads/dist/zhaobiao/zbapp/migrations' 

:私はコンパイル済みのexeファイルを実行すると

/usr/local/python2.7/bin/pyinstaller --name=zhaobiao ./zbproject/manage.py 

それは私に次のエラーが発生しましたパスの不一致、どうすればいいですか?

+0

pyinstallerを使用する必要がありますか?私はピップとvirtualenvを使用することをお勧めします – jonprasetyo

+0

私は実行可能なWindowsプログラムを作成したい。 virtualenvは達成することができますか? @jonprasetyo – fedel

答えて

0

私は今、それが動作/

をディレクトリ/ルート/ダウンロード/ zbproject/zbappに/ルート/ダウンロード/ DIST/zhaobiaoをコピーしてきました。

[[email protected] test]# ./dist/zhaobiao/zhaobiao runserver 0.0.0.0:8000 
Performing system checks... 

System check identified no issues (0 silenced). 
May 30, 2016 - 03:04:49 
Django version 1.9.5, using settings 'zhaobiao.settings' 
Starting development server at http://0.0.0.0:8000/ 
Quit the server with CONTROL-C. 
関連する問題