我是一个相当新的程序员我通过pip安装了flask并试图在Pycharm中运行它,它不会工作,所以我在Pycharm上下载了Flask 1.02,然后它给了我一些错误消息,我将包含在一些图片。这让我疯狂,如果有人能帮我解决这个问题,我会非常感激!
编辑这些是错误消息:
Traceback (most recent call last):
File "/Users/Farhan/PycharmProjects/Helloworld/fuck_you.py", line 1, in <module>
from flask import Flask
File "/Users/Farhan/PycharmProjects/Helloworld/venv/lib/python3.6/site-packages/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "/Users/Farhan/PycharmProjects/Helloworld/venv/lib/python3.6/site-packages/werkzeug/__init__.py", line 151, in <module>
__import__('werkzeug.exceptions')
File "/Users/Farhan/PycharmProjects/Helloworld/venv/lib/python3.6/site-packages/werkzeug/exceptions.py", line 67, in <module>
from werkzeug._internal import _get_environ
File "/Users/Farhan/PycharmProjects/Helloworld/venv/lib/python3.6/site-packages/werkzeug/_internal.py", line 30, in <module>
string.digits +
AttributeError: module 'string' has no attribute 'ascii_letters'
答案 0 :(得分:0)
我找到了答案!所以,我之前尝试在pycharm上的virtualenv上安装flask,但是这次我在该文件中创建了一个新文件和一个新项目,并在Pycharm上用pip安装烧瓶重新安装了烧瓶,并且令人惊讶的是它有效。