I have my code in Python3.5 64bit version. I wanted to use the Tkinter package to create a GUI for my application. However, "Tkinter" is compatible with 32-bit version and I could not find any source to solve this problem. Is there any other package to use for GUI development in Python 3 64-bit version?
Related
Development environment
1. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PyQt5 5.10
2. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PySide2 5.11.0
3. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PyQt5 5.9.2
Execution environment
Windows Server 2008 SP2
In case 1, 2 : Below Error Occurred.
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, webgl, windows.
But case 3 : No Error.
The results of testing the higher versions than Qt 5.10 are the same as case 1, 2.
I must use PySide2. but PySide2 does not have a lower version than Qt 5.9.2.
Is there a way to avoid the error using PySide2 ?
With Anaconda:
conda install -c conda-forge pyside2
But is an older version. (v5.6)
With the older version, I did not encounter any problems so far. I have the same problem with the new version but I need it because the older does not have support for QtCharts
I've developed a PyQt5 application on Linux (Ubuntu 16.04 LTS) that uses a QtWebKitWidget (QtWebView). It works great on Linux. I'm trying to package it for distribution for Windows using cx_Freeze, but the resulting application stops execution at launch with the PyQt5 error message "Import Error: Cannot import name 'QtWebKitWidgets.'"
I read that QtWebKitWidgets was deprecated from PyQt5 as of Qt 5.6, and that I should now use QtWebEngineWidgets instead. Fair enough. But I can't seem to install QtWebEngineWidgets on Ubuntu. I've installed Qt Creator 5.10 (most recent as of Dec 2017), and tried to include QtWebEngine via the oinline installation wizard, but the QtWebView widget is not listed in the toolbox.
My question: how can I use a PyQt5 WebView widget that will be cross-platform? If I use QtWebKit, it works on Linux but not on Windows. If I use QtWebEngine, it should work on Windows but not Linux.
What do I need to install on both platforms?
(Thanks in advance.)
There is no Twisted for python 3.5 at https://pypi.python.org/pypi/Twisted ,I am using python 3.5.2,what should I do?
I recently encounter a similar problem.
try this Unofficial Windows Binaries for Python Extension Packages
http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
Use command "pip install yourfilename.whl"
I used it to fix the problem while installing scrapy
Each new release of Twisted includes updates that bring full equal functionality to the python3 version. Releases are roughly monthly, so you may find that the module already works for you.
It is possible (for example with virtualenv) to install both python2 and 3 How to install both Python 2.x and Python 3.x in Windows 7
Twisted support of python 3 on windows is lagging a little behind support on other systems. So if you have access to another OS you may find that it will allow you to install twisted for python 3.
In order to run an optimization problem we set up Gurobi 6.0.4 together with
Anaconda (Version 2.2.0) Python (Python 2.7.9.) on
Linux CentOS release 6.6 (Final) with the 2.6.32-504.16.2.el6.x86_64 Kernel
Following the installation guidelines of Gurobi (listed here: http://www.gurobi.com/documentation/6.0/quickstart_linux.pdf)
everything worked out in the first step. Gurobi was installed, could obtain a license. Also the PATH variables have been set (in the .bashrc) according to the manual, with a little extension for the referal to anaconda python (and not the other local Versions of python (being 2.7 and 3.4):
export GUROBI_HOME="/opt/gurobi604/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin:${PATH}:opt/anaconda/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
Following the procedure we executed: python2.7 setup.py install in the respective directory /opt/gurobi604/linux64. After this usually you could run the import gurobipy command in the python interpreter wihtout errors. For older Versions of Gurobi (as 5.6.3) this works out very well.
For 6.0.4 though we constantly receive the error:
ImportError: /opt/anaconda/lib/python2.7/site-packages/gurobipy/gurobipy.so: undefined symbol: _Py_FalseStruct
This is very reproducible, no matter if we put anaconda also in the global path, and check the bash for any overwriting of the environment variables, which is not the case.
On Windows 8 the Gurobi 6.0.4 and Anaconda Python 2.2.0 work together without any problems.
Also applying hints from here: Python Module Error on Linux did not work out.
Did anyone else experience these problems with this tooling combination? thx.
The error message indicates that you use the Python module for version 3.4 in your Python 2.7 package directory. This can happen if you do not clean your Python module build directory between builds. Please try the following:
Completely remove the 2.7 package from your Python 2.7 installation (e.g. remove /opt/anaconda/lib/python2.7/site-packages/gurobipy)
Completely remove the Python module build directory from your Gurobi installation (e.g. /opt/gurobi604/linux64/build)
Re-run the build process for the Python 2.7 module (e.g. run "python2 setup.py install" in /opt/gurobi604/linux64)
Please note that CentOS is currently a non-supported platform for Gurobi.
Thank you for the hint, I think we tried that, but did not finish the procedure in this way. We tried to clean the system but in that particular case still hat both python Versions (due to other applications that use 3.4) on the machine. Our solution in this case was just to reinstall everything clean on a Ubuntu 14.04 VM. Since then no further problems occured. (I know not the cleanest solution.)
We had some similar issues when we updated to Gurobi 6.5, but that could be solved when corrctly addressing the usual path issues.
Thank you in any case for the reply, I think this really will help us with the next, then clean deployment :-)
I have installed a bunch of qt packages - qt, qt-devel, qt4, qt4-devel, sip but can't get latest PyQt4 to compile.
I've pointed the configure script at my qt4lib as such
python configure.py -q /usr/lib64/qt4/bin/qmake --verbose
but getting errors like
DBus v1 does not seem to be installed.
cfgtest_QtHelp.cpp:1:25: error: qhelpengine.h: No such file or directory
sip: /mnt/hgfs/rnp_repos/PyQt-x11-gpl-4.8.1/sip/QtCore/qabstractitemmodel.sip:156: syntax error
Error: Unable to create the C++ code.
EDIT: Found out that SIP v4.11.2 is required for PyQt 4.8 but still can't make without errors. At least python configure.py finishes now.
Any tips?
Grab the PyQt4 SRPM from Fedora and rebuild using mock. You may need to look a few versions back for one that will compile against the version of Qt 4 in CentOS.
I've just successfully compiled PyQt 4.8 on Centos 5.5. I went down the route of building Qt4 from source - using qt-everywhere-opensource-src-4.7.1.tar.gz from Nokia.
Had to obtain various *-devel packages before Qt's ./configure would complete - see http://doc.qt.nokia.com/4.7/requirements-x11.html (don't worry about the version numbers being slightly lower than required).
Also I used Python 2.6 from the EPEL 5 repository (python26-devel). Just remember when building PyQt to run python26 configure.py (and not the default Python). I don't know if this will improve your mileage in building PyQt but we're porting an application from Windows which was already using 2.6 so this route was necessary for me.
Not going to post my entire .bash_history here (much trial and error!) but if you're trying this and get stuck please ask a question.