Ponieważ python 3.0.1 nie jest dostępny w repozytoriach Debiana w żadnej z jego dostępnych wersji, pobrałem odpowiednią paczkę ze strony producenta oraz zainstalowałem (make altinstall) zgodnie z zaleceniami w pliku README:
Kod: Zaznacz cały
86 Installing multiple versions
87 ----------------------------
88
89 On Unix and Mac systems if you intend to install multiple versions of Python
90 using the same installation prefix (--prefix argument to the configure script)
91 you must take care that your primary python executable is not overwritten by
92 the installation of a different version. All files and directories installed
93 using "make altinstall" contain the major and minor version and can thus live
94 side-by-side. "make install" also creates ${prefix}/bin/python which refers
95 to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using
96 the same prefix you must decide which version (if any) is your "primary"
97 version. Install that version using "make install". Install all other
98 versions using "make altinstall".
99
100 For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the
101 primary version, you would execute "make install" in your 2.6 build directory
102 and "make altinstall" in the others.
http://zetcode.com/tutorials/pyqt4/firstprograms/
I teraz pojawia się problem nie tyle z samym Pythonem 3.0.1, bo ten działa poprawnie, co "niewiedzą" Pythona o istnieniu modułu PyQt4 (skrypt odpaliłem też dla natywnego Pythona i działa, tak więc zainstalowana jest paczka python-qt4):
Skypt:
Kod: Zaznacz cały
1 #!/usr/bin/env python3.0
2 # Filename: simpleqt4.py
3
4 import sys
5 from PyQt4 import QtGui
6
7 app = QtGui.QApplication(sys.argv)
8
9 widget = QtGui.QWidget()
10 widget.resize(250, 150)
11 widget.setWindowTitle('simple')
12 widget.show()
13
14 sys.exit(app.exec_())
Kod: Zaznacz cały
Traceback (most recent call last):
File "./simpleqt4.py", line 5, in <module>
from PyQt4 import QtGui
ImportError: No module named PyQt4
Jakiś pomysł?