Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ModuleNotFoundError:没有名为';fcntl&x27;当我试图在heroku上部署django项目时_Python_Django_Heroku - Fatal编程技术网

Python ModuleNotFoundError:没有名为';fcntl&x27;当我试图在heroku上部署django项目时

Python ModuleNotFoundError:没有名为';fcntl&x27;当我试图在heroku上部署django项目时,python,django,heroku,Python,Django,Heroku,我尝试在heroku上部署我的django项目,并遵循下面的命令 heroku login git init git add . git commit -m "first commit" heroku create heroku git:remote -a name pip install gunicorn gunicorn application.wsgi 在使用最新命令时,会出现以下错误: ModuleNotFoundError:没有名为“fcntl”的模块 如何解决此

我尝试在heroku上部署我的django项目,并遵循下面的命令

heroku login
git init
git add .
git commit -m "first commit"
heroku create
heroku git:remote -a name
pip install gunicorn
gunicorn application.wsgi
在使用最新命令时,会出现以下错误: ModuleNotFoundError:没有名为“fcntl”的模块


如何解决此问题?

底层操作系统是Windows吗?fcntl在Windows系统上不可用,Gunicorn在Windows上不工作

在Windows uing上运行WSGI web应用程序(如Django)

基本上,您只需将gunicorn调用替换为:

waitress-serve --listen=*:8000 myapp.wsgi:application

对于典型的应用程序,这将为您提供与运行gunicorn相同的结果。:)祝你好运

底层操作系统是Windows吗?fcntl在Windows系统上不可用,Gunicorn在Windows上不工作

在Windows uing上运行WSGI web应用程序(如Django)

基本上,您只需将gunicorn调用替换为:

waitress-serve --listen=*:8000 myapp.wsgi:application

对于典型的应用程序,这将为您提供与运行gunicorn相同的结果。:)祝你好运

我明白了。我正在使用Windows10。但解决这个问题的替代方案是什么呢?你可以从Gunicorn换成女服务员,这是一个很好的替代方案。。更新我的答案,我仍然是一个初学者,我不知道关于Gunicorn和女服务员。你能为初学者推荐一些将django部署到heroku的指南或资源吗?请查看我提供的答案中的链接。。你可以按照我看到的链接中的指导方针来做。我正在使用Windows10。但解决这个问题的替代方案是什么呢?你可以从Gunicorn换成女服务员,这是一个很好的替代方案。。更新我的答案,我仍然是一个初学者,我不知道关于Gunicorn和女服务员。你能为初学者推荐一些将django部署到heroku的指南或资源吗?请查看我提供的答案中的链接。。您可以遵循上述链接中的指导原则