Does anyone know where I can find a pip-install for PySide2?
It's 2017 and I can't seem to find a pip install or site-package containing the binaries for PySide2. I prefer not to deal with downloading the source code and compiling it myself, as that usually ends up being a huge headache as it's never a smooth process. Also considering it's highly likely someone else has already done it. If I were to be honest here, if I attempted to compile it myself and errors popped up, I wouldn't really know where to begin solving them, nor do I want to spend time doing that.
I just find it hard to believe I can't find it anywhere online or even in PIP when a lot of applications in the VFX industry are switching to PySide2.
I hope someone can help me out.
Thanks
Same Problem...
So i tried to build it. But there are Problems building the WebKit.
Hence my windows binaries are actually without a webkit binding.
You can obtain it through PyPI:
pip install PySide2
or if it fails (most likely because your pip executable is bound to python 2) try:
pip3 install PySide2
or even better:
python -m pip install Pyside2
This assumes that python is bound to Python 3, that way you're really sure about the Python version used, see Why you should use python -m pip.
There are wheels available by Fredrik Averpil here built with Qt 5.6.
Claudius Hansch's answer provides a wheel using Qt 5.9.
In any case, don't forget to either
set the QT_QPA_PLATFORM_PLUGIN_PATH environment variable as described here
or
create a qt.conf file in the folder of your python.exe with the content
[Paths]
Prefix = /dir_to_site-packages/PySide2
Binaries = /dir_to_site-packages/PySide2
PySide2 is now available on pypi so a simple
pip install PySide2
should work on Windows, OSX, and linux!
I use Python 3.7 on windows 10 pro, 64bit.
Installing via pip failed for me.
I ended up downloading the wheel from qt directly
QT official download page
and install the downloaded wheel which worked fine.
Related
I've run into some problems while trying to download packages with pip. Namely, when I run
pip install "dask[complete]"
on MacOS Catalina 10.15.7. Specifically, the package that throws this error is psutil.
I run into an #error: architecture not supported message. I believe this is because the installer is looking for the MacOS 10.14.6 SDKs, but I am on 10.15.7. One user on this post stated that installing a new Python 3 fixed the issue. Maybe this is because the newer Python comes with a cached version of the package that uses the MacOS 10.15.7 SDKs.
I'm guessing that there might be two solutions to this issue:
Download a non-cached version of psutil, which might be compatible with the version of Python I'm using as well as MacOS Catalina.
Download a newer version of Python 3, namely 3.8.5+, and replace the Xcode Python 3 with this version, enabling me to stay up-to-date with current Python and packages.
I'm wary of the second method because of any possible dependencies I will lose while updating, and I've also been made very aware through research that generally speaking, you don't want to mess with system Python installations.
I'm not opposed to being walked through the first solution, if it would indeed solve the problem, but am very curious about the second solution, again, if it is possible. If neither approach would work out as intended, has anyone encountered this issue and resolved it without using a fresh, SEPARATE install of Python? I don't really want to start messing with virtual environments, but if I must, I supposed I will just download PyCharm and restart there.
EDIT: After continuing to try to work around the issue, I've been led to believe that it is not being caused by an outdated version of psutil; could it be an outdated version of setup.py? In this case, would it indeed be an issue with an old Python version? I'm very new to configuring Python in depth like this, any help would be greatly appreciated.
Try setting the environment variable ARCHFLAGS="-arch x86_64" so Xcode 12 doesn't try to build an ARM64 universal binary. It worked for me on a different python package that had the same error.
ARCHFLAGS="-arch x86_64" pip install "dask[complete]"
(Thanks to Keith Smiley's comment at on Bitbucket for pointing this out.)
I was trying to install PyQt 5.9 but I have no idea what I'm doing. According to what I've seen I have to download Qt from:
https://qt-project.org
and then SIP (whatever that is...) and PyQt from:
http://www.riverbankcomputing.com
I did all that and Qt weights like 30 Gb...
Now I have to install pyqt but the README.md file says this:
'''INSTALLATION
Check for any other README files in this directory that relate to your
particular platform. Feel free to contribute a README for your platform or to
provide updates to any existing documentation.
The first step is to configure PyQt5 by running the following command.
python configure.py
'''
And I have no idea what to do now, I keep getting the 'no such file/directory found' error.
I went to the directory where I have python installed and I still get the same.
-
I have a Mac and python 3.6
Turns out I have Qt 5.8 already installed, and since I just downloaded 5.9 I'd like to upgrade it but I don't know how. And maybe it's taking up another 30Gb somewhere else.
Also, when I type 'which python' I get 'anaconda/bin/python' and not python 2.7, how do I fix that? also I went to the dir where I have python and have python 2.4, 2.5 and 2.7. Should I just delete the others? and what is SIP??
Check these steps
Go to the QT website and download it.
Install python on your pc,
If it's Linux: sudo apt-get install python3.6
Or see this link.
Install also some IDLE to work on, I'd recommend you to use PyCharm
You can install now your PyQt through your Pycharm, see in here, find for pyqt5.
There is always the option to install through pip3, try to use pip3 instead of pip, since you are using python3.
After having pip3, try now to install your pyqt5. Check it out.
Now you have an IDLE to work on with PyQt and Qt in your machine, maybe you have to say in your PyCharm that you will use python3.6 as your interpreter.
I looked this question here:
Is it possible to require PyQt from setuptools setup.py?
What's the proper way of distributing a python application that has a gui and it's based on PyQt ? (I am using PyQt5 and Python3)
I am still learning how to distribute things, so I don't know if my question makes sense.
Edit:
The answer is correct, sudo pip3 install . worked for me for my own setup.py file, but apparently pyqt5 doesn't include QtWebKitWidgets module, and it isn't available for installation in a separate package in pip3. So now I am thinking of moving away from Python completely and go with Javascript + Electron as a multiplataform easy to run language for development.
Can I require PyQt5 via setup.py?
In a word yes, as long as you restrict your support to PyQt5 and Python3.
The requirements specified in setup.py are typically provided by requesting packages from the Python Package Index (PyPi). Until recently these packages were source only, meaning that an installation depending on PyQt5 would only work on a system where it was possible to build it from source. Building on Windows in particular requires quite a lot of set up, and this would therefore put your application out of reach for anyone unable or unwilling to do this.
Note: As far as I am aware, it was never actually possible to build from source via PyPi. The standard approach was to download the source/binaries from Riverbank Software and build/install from there.
This problem was solved by the introduction of Python Wheels which provide a means to install C extension packages without the need for compilation on the target system. This is achieved by platform-specific .whl files. Wheels for PyQt5 on Python3 are available on PyPi for multiple platforms, including MacOS X, Linux (any), Win32 and Win64 which should cover most uses.
For example, this is the output when pip-installing PyQt5 on Python3 on a Mac:
mfitzp#MacBook-Air ~ $ pip3 install pyqt5
Collecting pyqt5
Downloading PyQt5-5.6-cp35-cp35m-macosx_10_6_intel.whl (73.2MB)
100% |████████████████████████████████| 73.2MB 2.5kB/s
Collecting sip (from pyqt5)
Downloading sip-4.18-cp35-cp35m-macosx_10_6_intel.whl (46kB)
100% |████████████████████████████████| 49kB 1.8MB/s
Installing collected packages: sip, pyqt5
Successfully installed pyqt5-5.6 sip-4.18
To set PyQt5 as a dependency of your own package simply specify it as normal in your setup.py e.g. install_requires=['PyQt5']
What's the proper way of distributing a Python GUI application?
Here you have a few options. The above means that anyone with Python3 installed can now install your application using pip. However, this assumes that the end-user has Python and knows what pip is. If you are looking to distribute your application with a Windows installer, MacOSX 'app' bundle, or Linux package, you will need to use one of the tools dedicated to that purpose.
Windows
cx_Freeze is a cross-platform packager that can package Python applications for Windows, Mac and Linux. It works by analysing your project and freezing the required packages and subpackages. Success depends largely on which packages you depend on and their complexity/correctness.
PyInstaller is another cross-platform packager that can package Python applications for Windows, Mac and Linux. This works in a similar way to cx_Freeze and will likely perform both better/worse depending on the packages.
PyNSISt builds NSIS installer packages for Windows. This has the advantage of being very straightforward: it simply packages all the files together as-is, without 'freezing'. The downside is that packages can end up very large and slower to install (but see the file-filter options). It now supports bundling of .whl files which will solve this in many cases. By far the easiest if you're targeting Windows-only.
MacOSX
cx_Freeze see above.
PyInstaller see above.
Py2app creates .app bundles from the definition in your setup.py. Big advantage is the custom handlers that allow you to adjust packaging of troublesome packages. If you're only targetting MacOSX this is probably your best option.
Linux
cx_Freeze see above.
PyInstaller see above.
stdeb build Debian-style packages from your setup.py definition.
Note: It is possible to write a very complex setup.py that allows you to build using one or more tools on different platforms, but I have usually ended up storing separate configs (e.g. setup-py2app.py) for clarity.
I'm in the process of trying to install rpy or rpy2 on my Macbook so I can use R from python. Information about rpy can be found here: http://rpy.sourceforge.net/index.html
My problem is in the installation itself. I can't seem to make python recognize Rpy using import command: I keep getting the message "No module named rpy2". Does anyone know where I can find some step-by-step instructions on how to successfully install this? I have already installed both python and R, and both are working perfectly. Thanks in advance!
Try easy_install rpy2. You need to install easy_install before that.
I took that from here
I long gave up on these issues on my Mac. Since I installed OS Lion, I found that I needed to switch to MacPorts and then installing packages like RPy2 from their repository.
I know some people like to dig into the system and learn all the idiosyncrasies of the architecture and keep a vanilla install of python on their Mac. I find that i get problems like yours too frequently and they distract me from real work.
I just download the MacPorts modules when I need them and get on with the problem at hand. Others say the same thing about HomeBrew but I have only worked with MacPorts and it makes installation of modules too easy. You may want to invest some time investigating if either of these solutions work for you.
Another approach to using package managers like MacPorts or HomeBrew is to use a virtualenv and install python and all related modules there. Again, not a solution I have tried directly, but a quick search will show you many endorsements for this approach to using a specific Python executable and packaging its modules In an isolated environment.
as long as you have pip installed on your mac, then life will be easy as:
sudo pip install rpy2
If you want rpy it isn't on macport, at least a search of their packages only showed rpy2. According to the rpy web site its in fink. However at the moment fink is down so I can't verify this. Which is irritating because I need rpy (not rpy2) because another package has a dependency on it.
I also tried pip to find rpy and it said no package, which is a shame because pip is great for python installs (provided I remember to use 'sudo' first.
I downloaded python sources. When I do configure, everything fine, but when I do make, it says that Tcl/Tk library not found. Where can I find all packages required by python?
Thanks in advance.
Look at the DSC file for the Ubuntu python2.7 package to find the Build-Depends and apt-get install all of them before building Python.
http://www.tcl.tk/software/tcltk/download.html
This has worked every time I needed it to. Make sure to read the INSTALL and/or README files as I remember it has a somewhat non-standard method of installation...