In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Recently, after learning the flask framework of Python and configuring the environment, I ran "hello.py" on the terminal without any problems, but when I opened it with pycharm, I found that there was something wrong with the code and could not import the Flask class. The detailed error information is as follows:
This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
Error details
This is the running result of the terminal.
Terminal result
It took a long time for Baidu to find a solution from the Internet. I hope it can help you here.
First, open the terminal (click the "Terminal" icon in the picture)
Open the terminal
Then enter it at the terminal
Pip install flask
Install flask
The great task has been completed
Running result
Note:
This solution, in fact, is in the pycharm terminal, re-installed flask; but I do not quite understand why, in the Windows environment through the pip installation of the package, in the pycharm can be directly imported, may be because this is in the Linux environment, or because I previously configured the environment, the configuration is a virtual environment. If any boss reads this blog, I hope you can give me some advice and leave an answer in the comments section.
The above Ubuntu pycharm can not import classes under the solution is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.