Python Forum
Updating Python version from command prompt and Conversion from PyQt4 to PyQt5
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Python version from command prompt and Conversion from PyQt4 to PyQt5
#1
Running: Ubuntu 16.04 and Python 3.5.2

So I ran a script which I found here: https://github.com/rferrazz/pyqt4topyqt5
in order to convert one of my projects built in PyQt4 into a PyQt5 project.

I ran the script and the conversion was made just fine with no errors. Essentially, everywhere QtGui() was used was changed to QtWidgets(). The only problem, when I try to run the new PyQt5 project I get the following error:

ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtGui.so: undefined symbol: PySlice_AdjustIndices

I am not positive but it seemed to me this would be a version error of some kind, which brings me to my questions. Is there a method of updating Python from 3.5 to the newest version release which I believe is 3.7 from the command prompt? Also, is the ImportError I got a version control issue like I believe it to be?
Reply
#2
I cloned the original code and could not find PySlice_AdjustIndices, spelling?

for command line install, see: https://www.digitalocean.com/community/t...-04-server

latest update is 3.7.0
Reply
#3
(Jul-18-2018, 09:50 PM)Larz60+ Wrote: I cloned the original code and could not find PySlice_AdjustIndices, spelling?

for command line install, see: https://www.digitalocean.com/community/t...-04-server

latest update is 3.7.0

You cloned and tried converting a simple Qt4 project into a Qt5 project and you did not get the PySlice_AdjustIndices ImportError? If that is the case which version of python are you using because I am not going to bother downloading 3.7 if it works with my version.
Reply
#4
Quote:tried converting a simple Qt4 project into a Qt5 project
I didn't try converting a project.
I am using 3.7.0.
I you post code, I will try to convert.
There's more to it than this package, is that correct?
I also don't know anything about this package. It's not part of the PyPi repository, and hasn't been updated since May of last year.
Reply
#5
(Jul-18-2018, 10:58 PM)Larz60+ Wrote:
Quote:tried converting a simple Qt4 project into a Qt5 project
I didn't try converting a project. I am using 3.7.0. I you post code, I will try to convert. There's more to it than this package, is that correct? I also don't know anything about this package. It's not part of the PyPi repository, and hasn't been updated since May of last year.

Yeah the actual package seems to work just fine. I think the problem, in general, is that PyQt5 only works for 3.7 but I was hoping to figure out if that was for sure the reason before I updated python. I guess I am worried I might have to re-download all of my modules. I am new to python and therefore, I have never updated an existing version before.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Python 3.10 and PyQt5(6) zazen000 2 7,696 Jun-14-2021, 05:02 PM
Last Post: deanhystad
  [PyQt] Control a combobox from another python file PyQt5 prath 0 2,274 May-05-2020, 03:22 PM
Last Post: prath
  [PyQt] how to transform pyqt4 code to pyqt5 code atlass218 4 4,835 Jan-20-2020, 05:45 PM
Last Post: Axel_Erfurt
  updating to pyqt5 LavaCreeperKing 4 8,020 Jun-30-2019, 10:13 PM
Last Post: LavaCreeperKing
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,823 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [PyQt] PyQt4 dynamic QComboBox littleGreenDude 4 5,674 Jan-02-2019, 07:22 PM
Last Post: littleGreenDude
  [PyQt] PyQt4 handle dynamic checkbox click littleGreenDude 1 6,580 Dec-27-2018, 09:17 PM
Last Post: littleGreenDude
  PyQt4 installation frustration littleGreenDude 4 4,538 Dec-27-2018, 04:29 PM
Last Post: littleGreenDude
  [PyQt4] Is it right python coding scheme between TCP Server Thread and GUI class ? KimTom 3 3,246 Sep-18-2018, 01:21 PM
Last Post: Alfalfa
  How to Integrate PyQt4 Custom Widget with Qt Designer Zukias 1 3,912 Aug-29-2018, 05:33 PM
Last Post: Zukias

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020