LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2020, 12:13 AM   #1
Neel2000
LQ Newbie
 
Registered: Aug 2018
Location: South Central Pennsylvania
Distribution: Ubuntu MATE, Mint
Posts: 8

Rep: Reputation: 0
Question Python Interpreter Path in VS Code: bin vs. usr/bin


So I am just getting started with python, as well as using linux.
I just downloaded python3 on Ubuntu 20.04 and I'm planning to use VS Code as my text editor.
I installed the VS Code python plugin provided by Microsoft, and it is asking me to choose my python interpreter's path.
The two options being bin/python3 and usr/bin/python3.
Me being a newbie, I have no idea what the difference is between these two paths.
Does it make a difference which one I choose, or am I free to choose either?
Let me know.
 
Old 05-17-2020, 01:29 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,663

Rep: Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777Reputation: 4777
most probably that would be /usr/bin/python3
https://www.geeksforgeeks.org/absolu...athnames-unix/
 
Old 05-17-2020, 02:30 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,616
Blog Entries: 9

Rep: Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094
Quote:
Originally Posted by Neel2000 View Post
So I am just getting started with python, as well as using linux.
I just downloaded python3 on Ubuntu 20.04 and I'm planning to use VS Code as my text editor.
I installed the VS Code python plugin provided by Microsoft, and it is asking me to choose my python interpreter's path.
The two options being bin/python3 and usr/bin/python3.
Me being a newbie, I have no idea what the difference is between these two paths.
Does it make a difference which one I choose, or am I free to choose either?
Let me know.
Where is your python?
Open a terminal and enter
Code:
which python3
That will tell you.

BTW, one thing Linux has no shortage of is code editors and IDEs. Nay, GNU/Linux is one big IDE. You don't need MS software to code.
 
1 members found this post helpful.
Old 05-17-2020, 04:34 AM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by Neel2000 View Post
Me being a newbie, I have no idea what the difference is between these two paths.
The difference is where the "python3" executable in YOUR system is really located, and no, it does make a difference which path you choose, because the one will work and the other will not.
As other already said: use "which python3" to find out where it is.
 
Old 05-17-2020, 02:36 PM   #5
Neel2000
LQ Newbie
 
Registered: Aug 2018
Location: South Central Pennsylvania
Distribution: Ubuntu MATE, Mint
Posts: 8

Original Poster
Rep: Reputation: 0
I found that python3 is located in the usr/bin directory.
So I selected that path in VS Code, and everything was fine.

And to ondoho, I realize that there are plenty of editors and IDEs in Linux, it's just that I'm more familiar with VS Code, and so I'm using it for now.
I will be trying out other applications like Geany, Vim, Emacs, and such. But for now, I'm just trying to familiarize myself with the system first.
 
Old 05-17-2020, 02:52 PM   #6
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 305

Rep: Reputation: Disabled
VS Code is free, open source, available on many platforms and a very good editor. A perfectly reasonable choice.
 
Old 05-17-2020, 03:10 PM   #7
shruggy
Member
 
Registered: Mar 2020
Posts: 993

Rep: Reputation: Disabled
^It's also the most popular development environment according to the recent StackOverflow survey.
 
Old 05-17-2020, 04:04 PM   #8
Neel2000
LQ Newbie
 
Registered: Aug 2018
Location: South Central Pennsylvania
Distribution: Ubuntu MATE, Mint
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by SoftSprocket View Post
VS Code is free, open source, available on many platforms and a very good editor. A perfectly reasonable choice.
While yes, the code itself is open source, the binaries are not and contain some telemetry elements. There is an app called VSCodium that uses open source binaries though.
 
Old 05-17-2020, 04:10 PM   #9
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,907

Rep: Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793
I've never used that on Linux
Code:
pacman -Si code
...
Name            : code
Version         : 1.42.1-1
Description     : The Open Source build of Visual Studio Code (vscode) editor
Architecture    : x86_64
URL             : https://github.com/microsoft/vscode
Licenses        : MIT
...
Depends On      : electron6  libsecret  libx11  libxkbfile  ripgrep
Optional Deps   : bash-completion: Bash completions
                  zsh-completions: ZSH completitons
...
Download Size   : 8.72 MiB
Installed Size  : 66.47 MiB
...
 
Old 05-18-2020, 12:46 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,616
Blog Entries: 9

Rep: Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094
Quote:
Originally Posted by SoftSprocket View Post
VS Code is free, open source
I stand corrected.
But then again...
Quote:
Originally Posted by Neel2000 View Post
While yes, the code itself is open source, the binaries are not and contain some telemetry elements.
But the electron dependency (see above) - shudder!

Whatever, I don't want to start an editor war.

Just one more thing to OP:
usr/bin is NOT the same as /usr/bin.
 
Old 05-18-2020, 07:56 PM   #11
Neel2000
LQ Newbie
 
Registered: Aug 2018
Location: South Central Pennsylvania
Distribution: Ubuntu MATE, Mint
Posts: 8

Original Poster
Rep: Reputation: 0
Angry

Quote:
Originally Posted by ondoho View Post
usr/bin is NOT the same as /usr/bin.
I understand that. Me leaving out root does NOT change the meaning of what I was saying. You don't have to be picky about it.
 
Old 05-19-2020, 02:33 PM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,616
Blog Entries: 9

Rep: Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094Reputation: 4094
Quote:
Originally Posted by Neel2000 View Post
You don't have to be picky about it.
I don't care one way or another, but your IDE will.
Also see my signature.
 
Old 05-19-2020, 03:10 PM   #13
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 305

Rep: Reputation: Disabled
When it comes to programming (and computers) you could say that good advice is picky advice ... unless we're discussing AI then fuzzy advice might be alright
 
  


Reply

Tags
newbie coding, python, python3, ubuntu 20.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vncserver -bash: /usr/bin/vncserver: /usr/bin/env: bad interpreter ravindert Linux - Server 1 07-23-2014 05:48 PM
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or director irlogo Red Hat 5 03-12-2012 04:38 AM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration