from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'Hello! this is the main page <h1>HELLO<h1>'
if __name__ == '___main__':
app.run()
我导入了所有需要的模块
我是烧瓶的新手
下面是追溯
如果您需要,我会提供更多信息:)
感谢所有Stackoverflow社区的帮助:))
Traceback (most recent call last):
File "C:/Users/Toshiba/Desktop/python_temelleri/pythonwebsite.py", line 1, in <module>
from flask import Flask
File "C:\Users\Toshiba\Desktop\python_temelleri\venv\lib\site-packages\flask\__init__.py", line 14, in <module>
from jinja2 import escape
File "C:\Users\Toshiba\Desktop\python_temelleri\venv\lib\site-packages\jinja2\__init__.py", line 12, in <module>
from .environment import Environment
File "C:\Users\Toshiba\Desktop\python_temelleri\venv\lib\site-packages\jinja2\environment.py", line 25, in <module>
from .defaults import BLOCK_END_STRING
File "C:\Users\Toshiba\Desktop\python_temelleri\venv\lib\site-packages\jinja2\defaults.py", line 4, in <module>
from .tests import TESTS as DEFAULT_TESTS # noqa: F401
File "C:\Users\Toshiba\Desktop\python_temelleri\venv\lib\site-packages\jinja2\tests.py", line 3, in <module>
import decimal
File "C:\Users\Toshiba\AppData\Local\Programs\Python\Python37\lib\decimal.py", line 3, in <module>
from _decimal import *
AttributeError: module 'numbers' has no attribute 'Number'