LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-10-2018, 06:15 AM   #1
rpaun
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Rep: Reputation: Disabled
upgrading from a version of python to the other


Hello,

I have recently installed Linux Mint 19 and noticed that it comes with python2.7.15rc1-1

This version of python (with the release candidate) is the current version from the repository, but I noticed that a newer version (and more stable) is available.

I ran the sudo apt install python-dev command and I get this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.15~rc1-1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Is there another way to upgrade to the newer version of python besides the classical: get package, untar it and then configure, make and make install?

Thank you kindly for taking your time to read my thread.
 
Old 07-10-2018, 07:37 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,223
Blog Entries: 9

Rep: Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617
are you talking about python2 vs python3?
they are suupposed to co-exist.
installing python3 will not remove python2.
 
Old 07-10-2018, 09:19 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Mint comes with both python2 and python3.
Don't fix it if it isn't broken.


terminal >
Code:
python3
I'd guess 90% of the system's package Management utilities rely on python2.

Upgrade that at your peril.
 
Old 07-10-2018, 09:35 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
To back up the other posters, both Python 2 and Python 3 are very important for the correct functioning of Mint. Both should be maintained at the repo versions. If you need a more up-to-date version of either Python 2 or 3, and you don't want to screw up your system, then you would be best advised to choose a rolling distro or a fixed-release distro with that version in its base repos.

Just because a package version is named as a release candidate, as is the case for the version of Python 2 in the Mint 19/Ubuntu 18.04 repos, doesn't mean that it isn't stable or well-tested (it normally has to be both of these to get into the repos in the first place).

Last edited by hydrurga; 07-10-2018 at 09:37 AM.
 
Old 07-10-2018, 09:50 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,505

Rep: Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314
which one is that "newer version (and more stable)"?
 
Old 07-10-2018, 10:16 PM   #6
rpaun
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am talking about python2. I do not want to mess with python2 because a lot of things depend on it.

I am trying to install some software and it has some issues with python. The wait for repository to upgrade or try another distro is not a solution to me.
 
Old 07-10-2018, 10:51 PM   #7
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,267

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
Aha!
Please post the problems you are having with the software you’re trying to install.
What is the software? What are the “issues”?
 
Old 07-11-2018, 12:37 AM   #8
rpaun
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Here are the lines where it crashes:

checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '2.7.3'... Traceback (most recent call last):
File "<string>", line 1, in <module>
File "ax_python_devel_vpy.py", line 6, in __init__
self.vpy = self.vtup(platform.python_version())
File "ax_python_devel_vpy.py", line 3, in vtup
return map(int, s.strip().split("."))
ValueError: invalid literal for int() with base 10: '15rc1'
no
configure: error: this package requires Python >= '2.7.3'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.

The problem is that when the program looks for a version newer than python 2.7.3, it runs into this problem:

ValueError: invalid literal for int() with base 10: '15rc1'

This is why I initially asked if there is a way to force an installation of python2.7.15 over 2.7.15rc1

The name of the software is RIVET and it can be downloaded from rivet.hepforge.org

Last edited by rpaun; 07-11-2018 at 12:39 AM. Reason: Forgot to add name of software
 
Old 07-11-2018, 02:17 AM   #9
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,267

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
Quote:
Originally Posted by rpaun View Post
configure: error: this package requires Python >= '2.7.3'.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
OK.
You have a version of python2 that is > 2.7.3...The version you have installed is 2.7.15, so you do not need to upgrade python2.

First, review configure --help (or maybe ./configure --help when in the installation directory).

Have you tried doing what the error messages suggested?
What does
Code:
which python
return? (my server returns /bin/python)
Then enter the value returned with --version
Code:
/bin/python --version
I think that will tell you what the "default" version is.

Have you read and followed these instruction?

The bottom line of my post is that you're chasing the wrong problem. Again, you appear to have a proper version of python installed...the issue appears to be that the install script isn't finding it. That's what you need to address.
 
Old 07-11-2018, 03:20 AM   #10
rpaun
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have tried to review what the error message says.

It seems that there should be some alterations in the configure file, but that is out of my league. You are correct about addressing the wrong problem, but I don't know how to adjust the script in such a way to make it work.
 
Old 07-11-2018, 04:59 AM   #11
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,505

Rep: Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314
for me it looks like it tried to understand 15rc1 as a version number - and failed.
probably installing an earlier version (like 2.7.14) would be good enough.
 
1 members found this post helpful.
Old 07-11-2018, 05:18 AM   #12
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,267

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
Heck of a good catch, pan64!!

I don’t know Mint...how do we help them with the downgrade?
OR (maybe better)
"pass[ing] the PYTHON_VERSION variable to configure"

rpaun...What does
Code:
configure --help
tell you??

Last edited by scasey; 07-11-2018 at 05:27 AM.
 
Old 07-11-2018, 06:44 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,223
Blog Entries: 9

Rep: Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617
^ ok that's probably something to check out.

i was thinking:
  • try to explicitely run with python2:
    Code:
    python2 /path/to/script
  • please show us
    Code:
    ls -l $(which python)
 
  


Reply


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
Upgrading Apache 2.2.16 (package version) to the latest version 2.2.26 (compiled vers Renaud06 Debian 8 11-27-2013 07:59 PM
Upgrading Python 2.7 Lautre Calculate 0 03-28-2011 03:40 AM
upgrading python version from 2.3 to 2.4 in fc3 sailu_mvn Linux - Software 1 07-21-2006 01:09 AM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 12:05 PM
Upgrading Python to newer version dopper Linux - Software 3 02-19-2004 01:10 PM

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

All times are GMT -5. The time now is 11:01 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