Python Dbus Error while installing through pip - python

python -m pip install dbus-python
Collecting dbus-python
Using cached dbus-python-1.2.16.tar.gz (576 kB)
Using legacy 'setup.py install' for dbus-python, since package 'wheel' is not installed.
Installing collected packages: dbus-python
Running setup.py install for dbus-python ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\pure8\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\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\pure8\AppData\Local\Temp\pip-record-l_6vpx3k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\pure8\AppData\Local\Programs\Python\Python38\Include\dbus-python'
cwd: C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\
Complete output (5 lines):
running install
running build
creating C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\build
creating C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\build\temp.win-amd64-3.8
error: [WinError 193] %1 is not a valid Win32 application
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\pure8\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\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\pure8\AppData\Local\Temp\pip-record-l_6vpx3k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\pure8\AppData\Local\Programs\Python\Python38\Include\dbus-python' Check the logs for full command output.
every time I try to install dbus it gives me an error, I tried installing 32 bit and 64 bit of new python updates, and they are added to PATH, but that didn't help to install dbus. Dbus is required for notify2.

I had met the same problem.
Perhaps it's not recommended to use dbus-python on the Windows.
I just move the folder /usr/local/lib/python2.7/dist-packages/dbus (Linux) to the Python2.7 folder (Windows).
And I can see the dbus in the VScode by Ctrl + mouse(left).

Related

"ERROR: CMake must be installed to build dlib" when installing face_recognition

I'm facing this error while installing face_recognition in a virtualenv with Python 3.8.10 on Ubuntu 20.04.
ERROR: Failed building wheel for face-recognition-models
Running setup.py clean for face-recognition-models
Failed to build dlib face-recognition-models
Installing collected packages: Click, numpy, dlib, face-recognition-models, face-recognition
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: '/home/badrelden/Desktop/test python sound/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tai2snq9/dlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tai2snq9/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 /tmp/pip-record-bhy0sde6/install-record.txt --single-version-externally-managed --compile --install-headers '/home/badrelden/Desktop/test python sound/venv/include/site/python3.8/dlib'
cwd: /tmp/pip-install-tai2snq9/dlib/
Complete output (8 lines):
running install
running build
running build_py
package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
running build_ext
ERROR: CMake must be installed to build dlib
----------------------------------------
ERROR: Command errored out with exit status 1: '/home/badrelden/Desktop/test python sound/venv/bin/python3' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tai2snq9/dlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tai2snq9/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 /tmp/pip-record-bhy0sde6/install-record.txt --single-version-externally-managed --compile --install-headers '/home/badrelden/Desktop/test python sound/venv/include/site/python3.8/dlib' Check the logs for full command output.
ERROR: CMake must be installed to build dlib
This is the key part of the error message. You need to install cmake, which can be done by running sudo apt install cmake on Debian-based systems, including Ubuntu. After cmake is installed, you can rerun the pip install command.

When i try to build wheel for dlib it says that i need cmake in order to do so. But i already have Cmake installed

When i try and install dlib using pip (pip install dlib) it says this:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\curry\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\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 'C:\Users\curry\AppData\Local\Temp\pip-record-ckv17yp4\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\curry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\dlib'
cwd: C:\Users\curry\AppData\Local\Temp\pip-install-qhiyfkci\dlib\
Complete output (8 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
ERROR: CMake must be installed to build dlib
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\curry\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\curry\\AppData\\Local\\Temp\\pip-install-qhiyfkci\\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 'C:\Users\curry\AppData\Local\Temp\pip-record-ckv17yp4\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\curry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\dlib' Check the logs for full command output.
I have tried to do pip install cmake and then pip install dlib but it did not work
Also for clarification i have installed Visual Studio community and use python 1.9. I use Windows 10
Thank you for Helping

imagecodecs python library won't install

I was trying to install the python scikit-image library using pip on a Jetson Xavier, and I got an extremely long error message indicating that it had failed to build the wheel for the "imagecodecs" library. I tried to install imagecodecs by itself and received a similar error message.
After some looking around, I found this question, and the error is identical to my own. However, the solution of updating pip did not fix the issue.
Error Message:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/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 /tmp/pip-wheel-5h3fo15u
cwd: /tmp/pip-install-iu5szk39/imagecodecs/
...
At top level:
imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for imagecodecs
Running setup.py clean for imagecodecs
Failed to build imagecodecs
Installing collected packages: imagecodecs
Running setup.py install for imagecodecs ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs
cwd: /tmp/pip-install-iu5szk39/imagecodecs/
...
At top level:
imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs Check the logs for full command output.
Try upgrading pip using this command.
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
pip should now be on the latest version.
$ pip3 --version
pip 20.1.1 from ...
Then install using pip3
pip3 install scikit-image

Command error when downloading 'main' module

When encountering this problem, I had tried to download the 'main' module from both the command prompt and the PowerShell. However, the same error result was shown. How can I solve this problem? This is the error message:
Collecting main
Using cached https://files.pythonhosted.org/packages/1c/f4/445fbd86d9ebd133a03a263482f72dd539ccc90a0c29693222903e5e145e/main-0.1.tar.gz
Installing collected packages: main
Running setup.py install for main ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Python 3.8.1\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"'; __file__='"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\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\asuit\AppData\Local\Temp\pip-record-oc5gc9jc\install-record.txt' --single-version-externally-managed --compile --user --prefix=
cwd: C:\Users\asuit\AppData\Local\Temp\pip-install-9tqrshss\main\
Complete output (6 lines):
running install
running build
running build_scripts
creating build
creating build\scripts-3.8
error: file 'C:\Users\asuit\AppData\Local\Temp\pip-install-9tqrshss\main\main' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python 3.8.1\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\setup.py'"'"'; __file__='"'"'C:\\Users\\asuit\\AppData\\Local\\Temp\\pip-install-9tqrshss\\main\\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\asuit\AppData\Local\Temp\pip-record-oc5gc9jc\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
The pip commands that I used are python -m pip install --user main for Command Prompt and pip install main for Windows PowerShell

got an error while installing pyodbc in virtual enviornment

I have created a virtual environment for flask development.now, I want to install pyodbc to connect with sql server. I tried to install with pip install pyodbc in my virtual environment. I got following error-
Collecting pyodbc
Using cached https://files.pythonhosted.org/packages/75/29/aa190749bac37ede0f11a68a75e7055254699c11572bd94213f1163dfd8f/pyodbc-4.0.27.tar.gz
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py) ... error
>ERROR: Command errored out with exit status 1:
command: 'C:\Users\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-wheel-49fya41s' --python-tag cp38
cwd: C:\Users\bitre\AppData\Local\Temp\pip-install-313n7fr3\pyodbc\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
>ERROR: Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-record-645ww_jo\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\bitre\AppData\Local\Temp\pip-install-313n7fr3\pyodbc\
Complete output (5 lines):
running install
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-record-645ww_jo\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I tried outside virtual Environment,
Requirement already satisfied: pyodbc in c:\users\bitre\anaconda3\lib\site-packages (4.0.26)
You can try installing using this command if anaconda as a base in virtual environment-:
conda install -c anaconda pyodbc

Categories

Resources