OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Visual Studio Code Terminal is Not Using Correct Python Interpreter

  • Thread starter Thread starter IrfanClemson
  • Start date Start date
I

IrfanClemson

Guest
I have Visual Studio Code (v 1.9) running on a Windows 10 machine. I want to use ESRI's Python interpreter and I selected that per this image:

Compiler Selection

After that, if I use the Run (right arrow) toward the top right of a python file then correct interpreter is selected and no issues. However, if I run the the python file using commands like in this screen:

Terminal Run of the Script

then some Python interpreter from Windows is selected. Please note: The error you see in this image of file not found is a fake error because the file really doesn't exist but it confirms that the Terminal is using wrong interpreter unlike the Run button.

I have tried to create a new Environment and selected the correct interpreter but still the Terminal is using the wrong interpreter . The Terminal does show the correct interpreter as in this image:

Terminal View of the Compiler

I prefer to run the Python script using the Terminal using keyboard short cuts instead of the Run button in the IDE. What can I do to fix this problem?
<p>I have Visual Studio Code (v 1.9) running on a Windows 10 machine. I want to use ESRI's Python interpreter and I selected that per this image:</p>
<p><a href="https://i.sstatic.net/f5iDdWA6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/f5iDdWA6.png" alt="Compiler Selection" /></a></p>
<p>After that, if I use the Run (right arrow) toward the top right of a python file then correct interpreter is selected and no issues. However, if I run the the python file using commands like in this screen:</p>
<p><a href="https://i.sstatic.net/gwebYyhI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gwebYyhI.png" alt="Terminal Run of the Script" /></a></p>
<p>then some Python interpreter from Windows is selected. Please note: The error you see in this image of file not found is a fake error because the file really doesn't exist but it confirms that the Terminal is using wrong interpreter unlike the Run button.</p>
<p>I have tried to create a new Environment and selected the correct interpreter but still the Terminal is using the wrong interpreter . The Terminal does show the correct interpreter as in this image:</p>
<p><a href="https://i.sstatic.net/jtT57nZF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jtT57nZF.png" alt="Terminal View of the Compiler" /></a></p>
<p>I prefer to run the Python script using the Terminal using keyboard short cuts instead of the Run button in the IDE. What can I do to fix this problem?</p>
 

Latest posts

S
Replies
0
Views
1
Safwan Aipuram
S
Top