我想运行:https://github.com/alectrocute/flaskSaaS
(我的系统:MacOS Sierra 10.12.6)
我按照说明中的说明进行设置
1.安装需求并设置开发环境。
make install && make dev
2.创建数据库。
python manage.py initdb
3.运行该应用程序。
python manage.py runserver
4.导航到localhost:5000。
在第三点,我收到以下错误消息:
MacBook:flaskSaaS-master user$ python manage.py runserver
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
Traceback (most recent call last):
File "manage.py", line 34, in <module>
manager.run()
File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 383, in handle
res = handle(*args, **config)
File "/usr/local/lib/python2.7/site-packages/flask_script/commands.py", line 425, in __call__
**self.server_options)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/site-packages/werkzeug/serving.py", line 988, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
File "/usr/local/lib/python2.7/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
File "/usr/local/lib/python2.7/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
exit_code = subprocess.call(args, env=new_environ, close_fds=False)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
我已经查找了GitHub问题https://github.com/alectrocute/flaskSaaS/issues/7,但问题尚未得到解决。
在StackOverflow上,我发现了类似的帖子不起作用/我不知道如何正确应用它们:
#!/bin/sh
输入了我的代码OSError: [Errno 8] Exec format error
with open('a','w') as f: f.write('exit 0')
输入了我的代码OSError: [Errno 8] Exec format error
RUN chmod 644 app.py
到docker文件"OSError: [Errno 8] Exec format error" when trying to run simple flask app in a docker container