Oct-14-2024, 01:49 AM
Hello Python Community
I'm not so new to Python. I went following a tutorial for crud in web app in Python. The issue is I have to install flask. I did, with pip, then I uninstalled it because the IDE couldn't see flask, then I tried to install again and the line:
from flask import Flask
produces an error (it says module is not found). I deleted the \.vscode\extensions folder and installed Python again; I was able to run py from the terminal, but when I tried to run the project appeared a dialogbox saying "There is no Python Debugger, do you want one?", then I installed a Python from Microsoft and then it was like it works the "Start debugging", but I installed flask with pip in the terminal and then I wrote pip list and saw Flask, but the project debugging stopped reporting flask is not found. Maybe the flask installation went to the installation folder of the Python.org download, the first, that wasn´t able to debug the project, actually I found flask files in this folder:
C:\Users\PABLO\AppData\Local\Programs\Python\Python313\Lib\site-packages\flask
I say that AppData folder is hidden, I don't know why.
I think that if I could run the project with my Python installation from official page (not the Microsoft one that VS Code prompt me to install) then it would see the flask installation and the project would run fine.
Would anyone please tell me how? I know this is a very basic question and I said I was a .Net developer and you are going to think I am a complete fool (and you'll be right!), but I always had trouble to set up developng environments.
Or can you tell me if there's a tutorial for setting up the IDE, or something?
Thank you very much in advance.
Pablo
PS: This didn't happen with tkinter
I'm not so new to Python. I went following a tutorial for crud in web app in Python. The issue is I have to install flask. I did, with pip, then I uninstalled it because the IDE couldn't see flask, then I tried to install again and the line:
from flask import Flask
produces an error (it says module is not found). I deleted the \.vscode\extensions folder and installed Python again; I was able to run py from the terminal, but when I tried to run the project appeared a dialogbox saying "There is no Python Debugger, do you want one?", then I installed a Python from Microsoft and then it was like it works the "Start debugging", but I installed flask with pip in the terminal and then I wrote pip list and saw Flask, but the project debugging stopped reporting flask is not found. Maybe the flask installation went to the installation folder of the Python.org download, the first, that wasn´t able to debug the project, actually I found flask files in this folder:
C:\Users\PABLO\AppData\Local\Programs\Python\Python313\Lib\site-packages\flask
I say that AppData folder is hidden, I don't know why.
I think that if I could run the project with my Python installation from official page (not the Microsoft one that VS Code prompt me to install) then it would see the flask installation and the project would run fine.
Would anyone please tell me how? I know this is a very basic question and I said I was a .Net developer and you are going to think I am a complete fool (and you'll be right!), but I always had trouble to set up developng environments.
Or can you tell me if there's a tutorial for setting up the IDE, or something?
Thank you very much in advance.
Pablo
PS: This didn't happen with tkinter