LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-15-2017, 08:18 AM   #1
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware, Ubuntu
Posts: 249

Rep: Reputation: 130Reputation: 130
python install question


The existing python 2 in installed in /usr (/usr/bin, /usr/lib).

Python 3 tarball defaults are set to install in /usr/local (/usr/local/bin, /usr/local/lib)

If I install python 3 and keep the original python 2, will there be problems between them?
 
Old 08-15-2017, 08:31 AM   #2
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware, Ubuntu
Posts: 249

Original Poster
Rep: Reputation: 130Reputation: 130
Nevermind. I found this.


http://www.linuxquestions.org/questi...ll-4175443290/
 
Old 08-15-2017, 08:36 AM   #3
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
I wouldn't suggest installing python3 from source directly to /usr/local/bin, since it can be difficult to get rid of it afterwards (Is there a easy way to update / install?) I'd suggest prefixing it with a specific install location (like /opt). Alternatively, Anaconda is good for getting python.

Anyways, if you examine several scripts in /usr/bin and /usr/local/bin you will notice hashbangs of mostly this sort (This is on Linux Mint Cinnamon)

Code:
#!/usr/bin/python
#!/usr/bin/python3
Because these appear to reference directly to a preinstalled python, you should be fine as long as you don't overwrite /usr/bin/python or /usr/bin/python3. However, some may contain something like this

Code:
#!/usr/bin/env python
So whatever the PATH variable says python is at, it will use. If $PATH references python3 as python, that could be a issue!
 
1 members found this post helpful.
  


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
Install Python 2.7.6 "python-devel" package CentOS 6.5 trava90 Linux - Software 1 01-29-2015 06:04 AM
How can I uninstall a python package installed with python setup.py install? milomak Linux - Software 1 11-16-2009 09:22 PM
Python question bluefire Programming 5 09-28-2004 12:30 PM
python question ywchen2000 Programming 1 04-20-2004 11:46 PM
install python 2.3 ,necssary to remove python 2.2 ngan_yine Linux - Newbie 7 12-28-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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