我在本地启动 heroku Web 服务器时遇到问题。这是我不断收到的错误消息:
PS C:\Users\Dragan\heroku_workspace\python-getting-started> heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
10:01:32 web.1 | Traceback (most recent call last):
10:01:32 web.1 | File "c:\users\dragan\anaconda3\lib\runpy.py", line 170, in _run_module_as_main
10:01:32 web.1 | "__main__", mod_spec)
10:01:32 web.1 | File "c:\users\usr1\anaconda3\lib\runpy.py", line 85, in _run_code
10:01:32 web.1 | exec(code, run_globals)
10:01:32 web.1 | File
C:\Users\Dragan\Anaconda3\Scripts\gunicorn.exe\__main__.py", line 5, in <module>
10:01:32 web.1 | File "c:\users\dragan\anaconda3\lib\site-packages\gunicorn\app\wsgiapp.py", line 10, in <module>
10:01:32 web.1 | from gunicorn.app.base import Application
10:01:32 web.1 | File "c:\users\dragan\anaconda3\lib\site-packages\gunicorn\app\base.py", line 12, in <module>
10:01:32 web.1 | from gunicorn import util
10:01:32 web.1 | File "c:\users\dragan\anaconda3\lib\site-packages\gunicorn\util.py", line 9, in <module>
10:01:32 web.1 | import fcntl
10:01:32 web.1 | ImportError: No module named 'fcntl'
[DONE] Killing all processes with signal null
10:01:33 web.1 Exited with exit code 1
我正在遵循本教程中描述的每个步骤LINK https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally我在项目“python-getting-started”中安装了虚拟环境。我正在尝试从项目的根目录启动本地网络服务器。
有人可以帮我解决这个问题吗?
UPDATE_1:我已经安装了适用于 Windows 的 Heroku Toolbelt,并且安装了适用于 Python 的 Anaconda。