LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-30-2014, 04:01 AM   #1
adsioros
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Rep: Reputation: Disabled
slackware 14.1 python problem


I recently tried to upgrade python 2.7.9 to 3.4 but i probably have messed it up.

bash-4.2# python
ImportError: No module named site
bash-4.2# python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
ImportError: No module named site
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] exceptions
# cleanup[1] _warnings
# cleanup sys
# cleanup __builtin__
# cleanup ints: 5 unfreed ints
# cleanup floats
bash-4.2# python --version
Python 2.7.9

i tried both slackbuild and source code from the official python site!
do you have any suggestions?
 
Old 12-30-2014, 04:33 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You're on slackware. Get onto alien bob's site as he has several python modules for download
 
Old 12-30-2014, 05:16 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by business_kid View Post
You're on slackware. Get onto alien bob's site as he has several python modules for download
Well not exactly.
I have a small amount of python modules available but those are all for Slackware's python2. The OP has attempted to upgrade to python3 and that is mostly incompatible with everything in Slackware.

It would have been better to keep Slackware's python2 and install python3 in parallel.

Eric
 
Old 12-30-2014, 05:51 AM   #4
adsioros
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
How exactly can i do that? is any restore package available for that or any way to do it?
 
Old 12-30-2014, 06:35 AM   #5
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
remove python and reinstall Slackware's Python and use SBo's python3 package
 
2 members found this post helpful.
Old 12-30-2014, 06:46 AM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
As Willy suggests, remove the existing python package and install the stock python package and python3 from Slackbuilds.org.

If you're into python development, I suggest you learn virtualenv (+ virtualenvwrapper, both available from slackbuilds.org) to manage your python environment and for adding additional modules (with pip).
 
Old 12-30-2014, 11:50 AM   #7
moesasji
Member
 
Registered: May 2008
Distribution: Slackware Current / OpenBSD
Posts: 322

Rep: Reputation: 104Reputation: 104
Quote:
Originally Posted by sycamorex View Post
If you're into python development, I suggest you learn virtualenv (+ virtualenvwrapper, both available from slackbuilds.org) to manage your python environment and for adding additional modules (with pip).
Or as an alternative have a look at either conda or miniconda. I use the latter for my python development as I find it far easier to deal with than virtualenv for things that don't get installed through pip.
 
  


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
[SOLVED] Installing Python 2.7.3 on Slackware 13.37 with Python 2.6.6 on it dc_eros Slackware 4 10-16-2012 09:30 PM
Creating python + pygame binaries on Slackware 13.37 problem. Braqoon Slackware 3 01-12-2012 05:48 PM
slackware current and python specialized Slackware 1 06-10-2009 07:56 PM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM
Python on Slackware 9.1 KnowNothing Linux - Software 17 02-06-2004 08:45 PM

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

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