Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that pycharm cannot import classes under Ubuntu

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains the "Ubuntu pycharm can not import classes how to solve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Ubuntu pycharm can not import classes how to solve" it!

After opening it with pycharm, it is found that there is an error in the code and cannot 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.

Thank you for your reading, the above is the "Ubuntu pycharm can not import classes how to solve" the content, after the study of this article, I believe you can not import classes under Ubuntu pycharm how to solve this problem has a deeper experience, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Internet Technology

  • Mybatis applicationContext.xml configuration method

    # what to do in applicationContext.xml Spring integrate Mybatis configuration

    © 2024 shulou.com SLNews company. All rights reserved.

    12
    Report