Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 input function visual studio terminal help
hi all, i been trying to figure out how to get the integrated terminal to work in visual studio code and i have no clue what going on. I have Extension Python Pack install by Don Jayamanne. I also added path to python in VS settings *python.pythonpath":"/usr/bin/python"* I also tried add configuration " add python terminal (integrate). Is there something I'm missing or am i doing something wrong? I followed but does not work. Thanks for all your help so far.
 name = input("Please enter your name: ")
print("hello, " + name + "!")JJG-MacBook-Pro:python_work Beware$ python
Please enter your name: dude
Traceback (most recent call last):
  File "", line 1, in <module>
    name = input("Please enter your name: ")
  File "<string>", line 1, in <module>
NameError: name 'dude' is not defined
JJG-MacBook-Pro:python_work Beware$
One other thing too add, I installed python 3.6.
When i use my mac terminal and I type python I get - Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

When i type python3 in the mac terminal I get - Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Would this cause any problems having both installed? i guess python 2.7 comes pre-installed with mac computers?


I changed paths inside VS user settings to python3 /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 and VS Integrated Terminal is working now, that solved my problem


Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Visual Studio-remove Output clutter mds 14 710 Jun-04-2020, 11:47 PM
Last Post: mds
  Getting an error while using input function dcsethia 5 154 May-11-2020, 04:59 PM
Last Post: buran
  Input() function not working in VS Code darpInd 7 419 Feb-17-2020, 03:28 PM
Last Post: snippsat
  Using input function in a Class wew044 2 255 Feb-06-2020, 03:08 AM
Last Post: wew044
  what would you call the input for the parameter(s) of a function you have defined? rix 3 277 Dec-16-2019, 12:04 AM
Last Post: rix
  Variable comments on Visual Studio Code sal 2 375 Oct-19-2019, 02:13 PM
Last Post: sal
  Visual Studio Python 2.2 Source Project bobosamma 5 408 Oct-14-2019, 11:19 AM
Last Post: snippsat
  In Visual Studio Python is not properly installed jalea148 4 469 Sep-26-2019, 12:31 PM
Last Post: snippsat
  run into issues while configuring visual-studio code on a win 7 machine. apollo 3 705 Sep-12-2019, 12:25 AM
Last Post: snippsat
  Mathematical function input Tiiill 2 335 Sep-10-2019, 09:25 PM
Last Post: nilamo

Forum Jump:

Users browsing this thread: 1 Guest(s)