#πŸ”’ Input in python

61 messages Β· Page 1 of 1 (latest)

ripe cape
#

Just started learning a couple minutes ago, it isnt working.

fringe knollBOT
#

@ripe cape

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.

ripe cape
#

anyone help me real quick?

#

thanks man

frigid seal
#

I honestly don’t see what the issue is, that should work

ripe cape
#

literally started like 7 minutes ago

zealous spire
#

Same, like what? Did you try running that again?

ripe cape
#

when it asks for the name

#

i type it out

#

then hit enter

#

then the red stuff appears

#

i dont even think its an error

#

it makes no sense

mortal fulcrum
#

tty doing it

a = str(input('sdfsdf: '))
print(a)
stiff gate
#

python 2.7?

ripe cape
#

i downloaded it like 30 minutes ago

zealous spire
#

Ah

stiff gate
sullen ore
#

you definitely have python 2.7, try installing the latest one

zealous spire
#

Yeah you're using 2.7

ripe cape
#

yes

mortal fulcrum
#

python --ver

ripe cape
#

so what it wont work?

sullen ore
#

python 2.7 had different syntax for print, install the latest python and try again

mortal fulcrum
ripe cape
#

let me see because i think it is not supported with my mac i have 10.13

mortal fulcrum
#

and use it

ripe cape
#

plus my pycharm latest version was incompatible as well, i had to download an older one

sullen ore
#

macs automatically come with pre-installed python 2.*, read up on how to set up new python on mac and follow the guide

#

ideally in a new environment

zealous spire
#

Strange, I thought Pycharm came with an interpreter too
Or maybe thats thonny

ripe cape
#

alright, let me update and see what i can do, i'll let you guys know. thanks for the quick help

stiff gate
#

just looked it up, in 2.7 input() evaluates what the user types as python code
there's raw_input() instead
but really 2.7 is ancient at this point and I don't see a reason not to use 3 unless you're working in an old codebase or smthn

ripe cape
#

just started installing 3.12

#

will it overwrite the 2.7

#

or do i have to manually delete it

#

and do i need to reinstall pycharm?

#

or will a restart suffice

sullen ore
#

don't delete the 2.7 on mac, are you following any up-to-date guides?

sullen ore
#

installing python on mac

zealous spire
ripe cape
ripe cape
#

i see add interpreter

zealous spire
#

Could you send a screenshot

ripe cape
#

sure

zealous spire
#

Yeah click on "Add Interpreter..."

ripe cape
zealous spire
#

There's probably an option to browse interpreters there

ripe cape
#

would you mind if i dm you and i share my screen?

zealous spire
#

Fine, but do note thats usually not whats encouraged here

ripe cape
#

thank you every one

#

!close

fringe knollBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.