Python Forum
input function visual studio terminal help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input function visual studio terminal help
#1
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 https://donjayamanne.github.io/pythonVSC...sole-apps/ 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 input.py Please enter your name: dude Traceback (most recent call last): File "input.py", 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$
Reply
#2
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?

thanks


Update:
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



thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Two arguments in input function Alfredd 4 737 Nov-09-2025, 12:56 AM
Last Post: Pedroski55
  Using a For Loop to subtract numbers from an input function. Anunderling 9 2,659 Sep-22-2025, 08:56 PM
Last Post: deanhystad
  Visual Studio Code help aaronrousch 4 4,765 Jan-25-2025, 05:55 AM
Last Post: ndc85430
  I cannot create a virtual environment on visual studio code using python Willem_Aucamp316 2 12,215 Nov-27-2024, 02:20 PM
Last Post: menator01
  Input function oldschool 1 1,235 Sep-14-2024, 01:02 PM
Last Post: deanhystad
  Code Completion in Visual Studio for External Libraries mjakov 0 1,258 Aug-25-2024, 02:48 PM
Last Post: mjakov
  difference between forms of input a list to function akbarza 6 3,400 Feb-21-2024, 08:02 PM
Last Post: bterwijn
  How to set PYTHONPATH in Visual Studio Code? aupres 5 19,736 Aug-15-2023, 03:51 PM
Last Post: snippsat
  how do I open two instances of visual studio code with the same folder? SuchUmami 3 7,660 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Visual Studio Code NewPi 3 2,769 May-16-2023, 11:13 PM
Last Post: snippsat

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.