#๐Ÿ”’ python for pip pip for flask

66 messages ยท Page 1 of 1 (latest)

midnight marsh
#

help plz

hazy swanBOT
#

@midnight marsh

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

thorny linden
midnight marsh
thorny linden
#

If you want to use pip with it, you'd do py -m pip.

thorny linden
midnight marsh
#

my laptop is tripping idk why it doesnt let me install these things

cursive hemlock
#

Ctrl+Z than enter

#

To exit the python interpreter

cursive hemlock
midnight marsh
sterile jacinth
midnight marsh
#

yessirrr

#

what next

sterile jacinth
#

Dewayne

sterile jacinth
cursive hemlock
#

Try the py -m pip again

midnight marsh
#

do you guys know the code for flask?

sterile jacinth
#

!pypi flask

hazy swanBOT
#

A simple framework for building complex web applications.

Released on <t:1731522278:D>.

midnight marsh
#

yeah

sterile jacinth
#

pip install flask

midnight marsh
cursive hemlock
#

py -m pip install

sterile jacinth
#

py -m pip install flask since we have to be absolutely explicit here

cursive hemlock
midnight marsh
sterile jacinth
midnight marsh
cursive hemlock
midnight marsh
#

is this module?

#

cuz is its still not running in terminal

sterile jacinth
midnight marsh
cursive hemlock
#

Now run the code

midnight marsh
#

this is all i am getting

cursive hemlock
#

It most probably is what u want to see

#

Is the whole code at the moment just that import?

midnight marsh
#

i dont get it?

#

yeah

cursive hemlock
#

Bc in that case ur good to continue

cursive hemlock
midnight marsh
sterile jacinth
#

I think you need to run it

#

app.run or something? I forget what it is

cursive hemlock
cursive hemlock
midnight marsh
sterile jacinth
sterile jacinth
#

you can probably do py -m flask --app app run --debug

cursive hemlock
midnight marsh
#

in terminal or vs code

cursive hemlock
#

We usually add it in a
if __name__=="__main__"
So it only starts when its ran and not when its imported

#

!d flask.Flask.run

hazy swanBOT
#

run(host=None, port=None, debug=None, load_dotenv=True, **options)```
Runs the application on a local development server.

Do not use `run()` in a production setting. It is not intended to meet security and performance requirements for a production server. Instead, see [Deploying to Production](https://flask.palletsprojects.com/en/latest/deploying/) for WSGI server recommendations.

If the [`debug`](https://flask.palletsprojects.com/en/latest/api/#flask.Flask.debug) flag is set the server will automatically reload for code changes and show a debugger in case an exception happened...
cursive hemlock
#

I reccomended debug mode for u and if it has a problem with not getting a host than localhost should fit that arg

sterile jacinth
hazy swanBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.