Failed building wheel for PySide when installing pyside on Mac - pyside

I have installed:
*Python 3.6.1
*qt/5.9.1
*sip-4.19.3
When I type
pip install pyside
Or
pip install -U PySide
I always get the error bellow:
Collecting PySide
Using cached PySide-1.2.4.tar.gz
Building wheels for collected packages: PySide
Running setup.py bdist_wheel for PySide ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/tmp5VfNR7pip-wheel- --python-tag cp27:
Removing /private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/pyside_package
running bdist_wheel
running build
Python architecture is 64bit
error: Failed to find qmake. Please specify the path to qmake with --qmake parameter.
----------------------------------------
Failed building wheel for PySide
Running setup.py clean for PySide
Failed to build PySide
Installing collected packages: PySide
Running setup.py install for PySide ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-lTCccK-record/install-record.txt --single-version-externally-managed --compile:
Removing /private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/pyside_package
running install
running build
Python architecture is 64bit
error: Failed to find qmake. Please specify the path to qmake with --qmake parameter.
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools,
tokenize;__file__='/private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n','\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record /var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-lTCccK-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/tv/4rb2txws5ml_cwj0v060ym_80000gn/T/pip-build-jscv9F/PySide/

Ok, I finally found a "solution".
First of all, I am not an expert (I am super new coding).
Based on my own experience below you will find a solution as well.
I need to clarify something first, there are two ways to use this GUI QT - PyQt by Riverbank Computing or(and) PySide, originally developed by Nokia.
I tried many differents ways to install PySide, but no success, so I ended up finding PyQt, that does the same thing.
Watching this video I installed the PyQT5 in my Mac OS and now it is working.
https://www.youtube.com/watch?v=2kHk8ZjxH64
Example of Hello World using PyQT
http://pythoncentral.io/intro-to-pysidepyqt-basic-widgets-and-hello-world/
The wiki.qt.io says
"PySide has included support for Python 3.2 since version 1.0.8." but it doesn't work for me.
Good lucky.

Related

Problem installing "fastai" on macOS 10.15

When running pip3 install fastai I get the following error:
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9v/_09ftt2n0bv9sthtfh2j5gp80000gn/T/pip-install-zdk93g56/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/9v/_09ftt2n0bv9sthtfh2j5gp80000gn/T/pip-install-zdk93g56/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/9v/_09ftt2n0bv9sthtfh2j5gp80000gn/T/pip-record-7y_ev9f3/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pynvx
Do you have any idea what the problem is?
There is another error saying I have to install CMake but I already installed it.
I do not know if this is your problem (I'm a bit of a novice with this stuff), but I also was trying to install fastai with python 3.8 on macOS 10.15 and it failed on pynvx compilation.
I was able to get fastai to install, by ignoring its dependencies (and therefore pynvx), but was still able to successfully execute the libraries that required fastai. I did this:
pip install --no-deps fastai
and then ran my scripts. Can't say I understand why this works, but in the hopes that it does for you, I'm responding.

Errors in downloading the python modules using pip

often I face the same error during downloading the python modules using pip. Could you guys help me sort this out? FYI I am using python 3.7v.
C:\>pip install PyAudio
Collecting PyAudio
Downloading https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: PyAudio
Running setup.py bdist_wheel for PyAudio ... error
Complete output from command c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\PyAudio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-wheel-fjb2zkz4 --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
Complete output from command c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\PyAudio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-record-h2e_hkyb\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\PyAudio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-record-h2e_hkyb\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-install-_qfc03y7\PyAudio\
It doesn't look like PyAudio has a binary package available under pip. Christoph Gohlke maintains Unofficial Windows Binaries for Python Extension Packages and it has PyAudio. Download an appropriate version, then install it directly with pip install.

Install dlib in python3 on mac

Getting the below as error:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-build-_1n6svbf/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-0m_zvdwp-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake on OSX using `sudo brew install cmake`.
You can also specify its path with --cmake parameter.
----------------------------------------
Then sudo brew install cmake is not installing as well.
Any solutions to this.
Maybe you should use brew without sudo..
brew install cmake

Error installing scipy using pip on Windows 10 32 bit

Installing scipy using pip gives me following error.
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\arun\appdata\local\temp\pip-build-nlwjdr\scipy\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\arun\appdata\local\temp\pip-5qc2vr-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\arun\appdata\local\temp\pip-build-nlwjdr\scipy\
Tried cloning the scipy from github and running setup command. No luck.
python setup.py install
UPDATE: Installed Windows binary available at this link and it worked
http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download

Errors when pip install psycopg2 to virtualenv

I have created virtual environment
leo#kodar:/var/www/python$ mkvirtualenv -p /var/www/python/3.5.0/bin/python3 --no-site-packages env350_185
and trying to install psycopg2 to it.
pip3 install psycopg2
This gives me a big log with errors. Here is the resume string of output log:
Command /var/www/.virtualenvs/env350_185/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-xibdmand/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gtvfmn3f-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/.virtualenvs/env350_185/include/site/python3.5 failed with error code 1 in /tmp/pip-build-xibdmand/psycopg2
When I try to do the same with virtual environment created with system version of Python3
mkvirtualenv -p /usr/bin/python3 --no-site-packages env_sys
it gives success.
What could the problem be? Other packages like Django 1.8.5 can be installed correctly. I have also tested it with python 3.4.3 from custom folder and get the same error. Only system python3 (3.4.3) works.
Full pip error log is here: https://gist.github.com/leoKiddy/25beaa96c67b2cfa2263

Resources