LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2016, 08:09 AM   #1
myewaccc1
LQ Newbie
 
Registered: Mar 2016
Posts: 5

Rep: Reputation: Disabled
Are Python and Java preinstalled on Linux ?


Hi,
Can i count on a fresh Linux install (of any of the big distributions) to already be able to run java and python programs?
If so, what version of java/python can i assume it is running?

Thanks.
 
Old 03-21-2016, 08:14 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,793

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
no, not really. Usually, but probably not always. You need to take care about that yourself if you want to be really sure.
Versions are always different, changing...
 
Old 03-21-2016, 08:48 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by pan64 View Post
no, not really. Usually, but probably not always. You need to take care about that yourself if you want to be really sure.
Versions are always different, changing...
Yeah changing updating changing updating two versions of Java freeJava, and that other one, maybe more.

if you what to really know then type
Code:
javac
python
in the command line, but yeah Like the man said... refer back to post #2
 
Old 03-21-2016, 05:41 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,642
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
If you are building something to install on "any Linux," you should not assume that anything-at-all is already present. Nor that they are at the minimum version-levels that you need!

You will routinely find ./configure scripts (made using autoconf) ... performing these tests.

Another option is to create a "package" and to specify prerequisites. Of course, this requires a certain amount of distro-specific work since not all "packages" are the same. But you can be version-specific, then ...

Last edited by sundialsvcs; 03-23-2016 at 01:11 PM. Reason: fix tpyo
 
Old 03-21-2016, 05:48 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
I don't understand why people think "is this preinstalled?" is a question worth asking. You can install software after installing the distribution.

Anyway, Slackware and all distributions that use Yum preinstall Python 2.

Last edited by dugan; 03-21-2016 at 05:51 PM.
 
Old 03-22-2016, 11:25 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
As you are talking about "big distributions" you can count on both being installed, as so many configuration tools use Python and the usual office software uses Java. But (there's always a "but"!) at the moment you can't tell whether you'll get Python 2 or Python 3.
 
Old 03-22-2016, 11:26 AM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by DavidMcCann View Post
As you are talking about "big distributions" you can count on both being installed, as so many configuration tools use Python and the usual office software uses Java. But (there's always a "but"!) at the moment you can't tell whether you'll get Python 2 or Python 3.
Yes you can. If it's preinstalled and the distribution isn't Arch, it's Python 2. You can also check Distrowatch.

Last edited by dugan; 03-22-2016 at 11:37 AM.
 
Old 03-23-2016, 11:18 AM   #8
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I haven't checked them all, obviously, but I do remember Fedora is now on Python 3.
 
Old 03-23-2016, 01:16 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,642
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Quote:
Originally Posted by dugan View Post
I don't understand why people think "is this preinstalled?" is a question worth asking. You can install software after installing the distribution.
I assumed that the OP is creating some type of software that depends on one-or-another programming language being available.

I now see that autoconf scripts apparently does not have the ("automatic, easy") capability to search for Perl, Python, and so on being installed. But there are plenty of examples of installation scripts, including packages, that do. (A simple "file-existence test," at the usual cadre of places [or by following $PATH] might be adequate unless you are asking for a particular version to be present. Still, examples of those things exist, too.)

(Incidentally, it might be wise to program your install or configure script to support a parameter like --java-exists which would cause it to skip that language-existence test, on the basis is that the user is asserting that it does exist, i.e. and does not wish for you to test for it or has found that your test doesn't work. Leave an "out," so as not to show-stop an installation if all of your design-time guesses turn out to be wrong.)

Last edited by sundialsvcs; 03-23-2016 at 01:19 PM.
 
  


Reply



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
New to Linux and well ..C/C++/Python/Java/Jython/Android Looneys clumszy Linux - Newbie 1 02-15-2014 07:18 AM
To install java in solaris sparcv9 and removing the preinstalled java versions saurabh593 Solaris / OpenSolaris 6 06-14-2012 01:43 PM
preinstalled linux by linuxcertified.com? trisha Linux - Laptop and Netbook 3 03-31-2004 11:38 AM
Linux Preinstalled on Laptops? dkraut Linux - Laptop and Netbook 5 03-10-2004 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:49 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
Open Source Consulting | Domain Registration