SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-07-26 23:35:41

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

[solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Hello together,

a program (bitmessage) requires Python 2.7.4 - is there a possibility to upgrade or would this be a stupid idea and cause more problems than it solves?

Thanks in advance!
sj7

Last edited by saljut7 (2014-08-25 14:19:45)

Online

Be excellent to each other!

#2 2014-07-27 06:32:27

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Debian Stable already has python 2.7.3-4
Or you could download and build it from here
Or get packages from here


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#3 2014-07-27 12:13:31

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

Debian Stable already has python 2.7.3-4
Or you could download and build it from here
Or get packages from here

Thanks alot Damo. Python Version 2.7.3-4+deb7u1 is already installed on my system. Don't know why Bitmessage still doesn't work but I have to ask this at the Bitmessage-forum.

Online

#4 2014-08-12 15:36:08

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Hey crunchbangers,

in my last post I told to ask in bitmessage-forum for my problem. Well, while I was trying to update my Python-version to run bitmessage the developers changed the requirements so that Python 2.7.4 (which wasn't high anough anyway, had to try again with 2.7.5) is not necessary anymore.

Now Bitmessage still doesn't start. It says "No module named _sqlite3" starting via CLI. Somebody told me I forgot to include sqlite3 in the building-process. But sqlite3 is already installed my package managers says.

Beside the Bitmessage-problem: At the moment I can not use the Exit-function in the menu of Openbox anymore. Nothing happens. I think I "destroyed" the installed Python. Unfortunately I got to know the checkinstall-program firstly after several experiments to build a newer Python so I think there is a lot of Python-stuff on my system which doesn't fit to each other.

As far as I remember I started with Python src 2.7.8 (didn't work), then 2.7.4 (wasn't high enough), then 2.7.5 (didn't work and became obsolete).

I already reinstalled successfully

python-minimal version 2.7.3-4+deb7u1
python2.7-minimal version 2.7.3-6+deb7u2
python2.7 version 2.7.3-6+deb7u2

using package manager.

Any ideas what I can do to make some kind of "rollback" to Python 2.7.3-4?

Sorry... next time I should do experiments on a virtual machine.
sj7

Online

#5 2014-08-12 16:41:30

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Sounds like your python environment is broken, as far as the crunchbang scripts are concerned.

I can't remember how to sort out the python environment (I have run 3 versions simultaneously in the past), but as a work-around you could maybe edit /usr/bin/cb-exit to run a specific version. The first line would read (I think!)

#!/usr/bin/env python2.7.3

Don't forget you can exit with

sudo shutdown -h now

Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#6 2014-08-12 18:28:20

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

Sounds like your python environment is broken, as far as the crunchbang scripts are concerned.

I can't remember how to sort out the python environment (I have run 3 versions simultaneously in the past), but as a work-around you could maybe edit /usr/bin/cb-exit to run a specific version. The first line would read (I think!)

#!/usr/bin/env python2.7.3

Don't forget you can exit with

sudo shutdown -h now

Thank you! Such problems are also a good possibility to fresh up some cli-commands. In the same way I got used to use Vi, smile

Okay, I edited /usr/bin/cb-exit, restarted Openbox via menu, tried "exit" but still no reaction.

Online

#7 2014-08-12 19:23:01

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Open a terminal and run

cb-exit

Post any errors output here (using [ code ] tags)


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#8 2014-08-13 09:58:32

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

Open a terminal and run

cb-exit

Post any errors output here (using [ code ] tags)

Starting with the line #!/usr/bin/env python2.7.3 in /usr/bin/env/cb-exit:

Thank you!

$ cb-exit
/usr/bin/env: python2.7.3: No such file or directory

Starting with the line #!/usr/bin/env python in /usr/bin/env/cb-exit:

saljut7@Sputnik:~$ cb-exit
Traceback (most recent call last):
  File "/usr/bin/cb-exit", line 3, in <module>
    import pygtk
ImportError: No module named pygtk

So there is something missing called "pygtk", isn't it? Just want to confirm before trying more "experiments"...

Online

#9 2014-08-13 16:59:57

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Yes, it looks like you have removed the python pygtk module at some point.


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#10 2014-08-13 19:43:23

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

Yes, it looks like you have removed the python pygtk module at some point.

Okay, so I have to reinstall if possible. When looking for "pygtk" in the package manager there are a lot of packages. Which one is the one I'm lookin for? Or do I have to build it like described here?

Online

#11 2014-08-13 22:10:02

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

saljut7 wrote:
damo wrote:

Yes, it looks like you have removed the python pygtk module at some point.

Okay, so I have to reinstall if possible. When looking for "pygtk" in the package manager there are a lot of packages. Which one is the one I'm lookin for? Or do I have to build it like described here?

PyGtk is a set of Python bindings to the GTK Toolkit, not a Debian package. Download link on the Python wiki

Although I suspect you may have messed up a lot of your python. Maybe purge and reinstall?

For your original needs, it is possible to have many different versions of python on your system, which can be managed using environment variables.


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#12 2014-08-14 23:04:30

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

PyGtk is a set of Python bindings to the GTK Toolkit, not a Debian package. Download link on the Python wiki

Although I suspect you may have messed up a lot of your python. Maybe purge and reinstall?

For your original needs, it is possible to have many different versions of python on your system, which can be managed using environment variables.

Well, reinstall is an option but not the one I would learn something of (I mean, reparing teaches me more than buying something new).

Following building instructions for PyGTK the process stopped for a missing package 'pygobject-2.0':

pygtk-2.24.0$ ./configure --prefix=/usr/share/python/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for bind_textdomain_codeset... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for some Win32 platform... no
checking for native Win32... no
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.lt
config.lt: creating libtool
checking for a Python interpreter with version >= 2.3.5... python
checking for python... /usr/local/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for headers required to compile python extensions... found
checking for PySignal_SetWakeupFd in Python.h... yes
checking for python module thread... yes
checking whether to enable threading in pygtk... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.8.0... yes (version 2.32.4)
checking for PYGOBJECT... no
configure: error: Package requirements (pygobject-2.0 >= 2.21.3) were not met:

No package 'pygobject-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PYGOBJECT_CFLAGS
and PYGOBJECT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

As far as I understood here this is caused by a missing package 'python-gobject-dev'. So I went on with sudo apt-get install python-gobject-dev which was stopped with the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-gobject-dev : Depends: python-gobject-2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Okay, I'm not tired to try something more to fix the problem but I think I'm somehow in a vicious circle... is there something I more I could try before a complete reinstall?

Thanks a lot for your patience!

Online

#13 2014-08-15 14:42:59

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

Have you enabled deb-src in your sources.list?

I wasn't suggesting a complete reinstall yet - just the python (hence the mention of --purge)

Last edited by damo (2014-08-15 14:44:16)


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#14 2014-08-15 16:00:17

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

Have you enabled deb-src in your sources.list?

You mean Software Sources in the Package Manager? At the moment:

waldorf main
deban wheezy main contrib non-free
debian wheezy-backports main (did this for LibreOffice one day)

What exactly I have to add?

damo wrote:

I wasn't suggesting a complete reinstall yet - just the python (hence the mention of --purge)

Great, looking forward to try a reinstall with --purge. Which packages exactly?

Last edited by saljut7 (2014-08-15 16:12:53)

Online

#15 2014-08-15 16:29:46

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

We seem to be having a misunderstanding here! Ignore synaptic for a minute and have a look at your sources.list (which is what the synaptic gui uses). Edit with geany as root (Run "gksudo geany /etc/apt/sources.list") or use nano in a terminal

sudo nano /etc/apt/sources.list

The default sources.list should look like (I think - I'm not running wheezy atm)

## CRUNCHBANG
## Compatible with Debian Wheezy, but use at your own risk.
deb http://packages.crunchbang.org/waldorf waldorf main
#deb-src http://packages.crunchbang.org/waldorf waldorf main

## DEBIAN
deb http://ftp.uk.debian.org/debian wheezy main contrib non-free
#deb-src http://ftp.uk.debian.org/debian wheezy main contrib non-free

The ones starting with "deb-src" are source package repositories, which provide access to the source code of the applications and the files needed to create a ".deb" package out of them. You need those enabled if you are trying to build a package, so uncomment them ie remove the "#", then save.

Then do an apt-get update and try building pygtk again.

I suggest you read up on apt-get, and how to remove/purge/reinstall packages. There are equivalent procedures with synaptic, but I rarely use it. To find out which python versions you have installed use

apt-cache policy python

. (It sounds like you may have mixed python versions)


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#16 2014-08-18 14:20:18

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

I suggest you read up on apt-get, and how to remove/purge/reinstall packages. There are equivalent procedures with synaptic, but I rarely use it. To find out which python versions you have installed use

apt-cache policy python

. (It sounds like you may have mixed python versions)

Hello damo,

at first thanks a lot for your advices and sorry for my late reply.

The day I wanted to start to solve the Python-problem following your tutorial I tried to help a friend setting up a boot-stick for a setting up a new linux-pc before. Even though I use an external disk to save larger files (like images) somehow my small Netbook-Disk became suddenly full around 99%. After a restart I couldn't login anymore ("failed to execute login command") and even some rescue-tutorial with CLI didn't work.

I was quite frustrated and set up a new #!. Unfortunately I couldn't try your dvices but I promise to keep them well. Think I will need them in future even I learned now to use checkinstall for self-compiled software.

So thank you very much again for your help!

Online

#17 2014-08-18 15:11:31

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 2,992

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

smile

"failed to execute login command" is a common error message when the disk is full, so the display manager (slim) fails to login. If you can start a tty (Ctrl-Alt-F1) then you can log in via the console screen. You can then make space and use eg startx to get the gui going.


Artwork at deviantArt;  Iceweasel Personas;  SLiM #! Themes;  Openbox themes

Online

#18 2014-08-18 21:06:17

saljut7
#! Member
Registered: 2013-10-31
Posts: 66

Re: [solved] Got lost in Python.. | Was: Upgrade to python 2.7.4 possible?

damo wrote:

If you can start a tty (Ctrl-Alt-F1) then you can log in via the console screen. You can then make space and use eg startx to get the gui going.

I tried it using a tty. Good to know how to go back again with startx! smile

Online

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo