can't install pycaw using pip - python

I tried installing pycaw with help of pip. It raised this error. How can I solve this error or download pycaw manually?
...........................................................................................................................................................................................................................................
C:\Users\hp>pip install pycaw
Defaulting to user installation because normal site-packages is not writeable
Collecting pycaw
Using cached pycaw-20181226.tar.gz (5.7 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\pkg_resources\__init__.py", line 2851, in get_entry_map
ep_map = self._ep_map
File "C:\Program Files\Python310\lib\site-packages\pkg_resources\__init__.py", line 2813, in __getattr__
raise AttributeError(attr)
AttributeError: _ep_map. Did you mean: '_dep_map'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\hp\AppData\Local\Temp\pip-install-q7kqui7h\pycaw_66d329da2c8e4069ab3ad04fde4ecaee\setup.py", line 5, in <module>
setup(name='pycaw',
File "C:\Program Files\Python310\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Program Files\Python310\lib\site-packages\setuptools\dist.py", line 453, in __init__
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
File "C:\Program Files\Python310\lib\site-packages\pkg_resources\__init__.py", line 641, in <genexpr>
for entry in dist.get_entry_map(group).values()
File "C:\Program Files\Python310\lib\site-packages\pkg_resources\__init__.py", line 2853, in get_entry_map
ep_map = self._ep_map = EntryPoint.parse_map(
File "C:\Program Files\Python310\lib\site-packages\pkg_resources\__init__.py", line 2538, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Here are some possible solutions as I can see for your problem:
Check that you have the Visual Studio C++ build tools installed:
https://visualstudio.microsoft.com/pl/visual-cpp-build-tools/
Maybe try add the following to the installation command: --use-deprecated=backtrack-on-build-failures for example: pip install pandas --use-deprecated=backtrack-on-build-failures
potentially you can install this development branch: pip install
https://github.com/AndreMiras/pycaw/archive/develop.zip
and after that, you can instal requirements

Related

Trying to pip install but get ```TypeError: 'Version' object is not subscriptable```

I'm on ubuntu and tried to install tardis by using:
pip install tardis-sn
but the output i got was:
Defaulting to user installation because normal site-packages is not writeable
Collecting tardis-sn
Using cached tardis-sn-1.0.1.tar.gz (1.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/setup.py", line 8, in <module>
import ah_bootstrap
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 530, in <module>
_main()
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 527, in _main
use_astropy_helpers(**kwargs)
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 198, in use_astropy_helpers
upgrade = _do_upgrade(dist, index_url)
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 285, in _do_upgrade
major, minor = (int(part) for part in dist.parsed_version[:2])
TypeError: 'Version' object is not subscriptable
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Please help me get rid of this error
I have tried using
pip install tardis-sn --use-deprecated=legacy-resolver
but the output i got was still the same

Metadata error when installing "pyqt6-tools"

I'm using Python 3.11. I'm trying to install pyqt6-tools using pip install pyqt6-tools command but the following error is occurred during installation:
C:\Users\Alex>pip install pyqt6-tools Collecting pyqt6-tools Using
cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl (29 kB) Collecting click
Using cached click-8.1.3-py3-none-any.whl (96 kB) Collecting
pyqt6==6.1.0 Using cached PyQt6-6.1.0.tar.gz (946 kB) Installing
build dependencies ... done Getting requirements to build wheel ...
done Preparing metadata (pyproject.toml) ... error error:
subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │
exit code: 1 ╰─> [33 lines of output]
Traceback (most recent call last):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 144, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
line 351, in
main()
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 148, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\api.py",
line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\project.py",
line 585, in setup
self.apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-install-m5ab_lv3\pyqt6_b00490afe1cb4b13bf5a1a49acc55f24\project.py",
line 60, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\pyqtbuild\project.py",
line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\project.py",
line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\pyqtbuild\builder.py",
line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
note: This error originates from a subprocess, and is likely not a
problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above
for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
How can I fix it?
It looks like this is might be a sort of bug, but really more that there isn't an installer yet for your version of python and OS.
You can either try installing an older version of Python, some version of 3.10 would probably do. Or you can try one of the workarounds detailed in the bug report that people have claimed to successfully have used in the github repo
The link directs you to instructions for PyQt5, but if you scroll down you will see people claiming that the same process works for PyQt6 and there are specific wheel files you can download.

Could not find module (or one of its dependencies). Try using the full path with constructor syntax?

I am trying to install greppo and this error is popping up.
Here is detail:
Collecting Shapely==1.7.1
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\waqas\AppData\Local\Temp\pip-install-7s68x426\shapely_7bc3527fa38249478d749a0dbc
729913\setup.py", line 85, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\waqas\AppData\Local\Temp\pip-install-7s68x426\shapely_7bc3527fa38249478d749a0dbc
729913\shapely\_buildcfg.py", line 205, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\waqas\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374,
in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the
full path with constructor syntax.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Error installing pgi package in python 3.8

I am new to programming and for a school project, I need to install pgi 0.0.11.2 package from PyPi. Whenever I try to install the package I get the following error:
Collecting pgi
Using cached pgi-0.0.11.2.tar.gz (239 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\setup.py", line 18, in <module>
import pgi
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\__init__.py", line 10, in <module>
from .importer import require_version, get_required_version
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\importer.py", line 15, in <module>
from .clib.gir import GIRepository
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\gir\__init__.py", line 8, in <module>
from .giargument import GIArgument
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\gir\giargument.py", line 9, in <module>
from ..glib import gboolean, gint8, guint8, gint16, guint16, gint32, guint32
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\glib.py", line 16, in <module>
_glib = find_library("glib-2.0")
File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\_utils.py", line 99, in find_library
_internal[name] = cdll.LoadLibrary(_so_mapping[name])
File "c:\users\user\appdata\local\programs\python\python38\lib\ctypes\__init__.py", line 447, in LoadLibrary
return self._dlltype(name)
File "c:\users\user\appdata\local\programs\python\python38\lib\ctypes\__init__.py", line 369, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libglib-2.0-0.dll'. Try using the full path with constructor syntax.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Following the error, I tried manually registering libglib-2.0-0.dll following this link. It still gives me the same error.
I have tried to use conda to install pgi but it was no use.
I am working on 64-it Windows.
I am actively having a meltdown. I would appreciate any suggestion.
I was able to solve creating a conda environment and installing the libglib through conda first:
conda install -c conda-forge libglib

Installation Error while installing pyqt-tools

I am trying to install PyQt6, in my cmd, when I run pip install pyqt6 its just works fine but when I try to install pip install pyqt-tools its shows this error:
C:\Users\lenovo>pip install pyqt6-tools
Collecting pyqt6-tools
Using cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl (29 kB)
Collecting python-dotenv
Using cached python_dotenv-0.19.2-py2.py3-none-any.whl (17 kB)
Collecting pyqt6==6.1.0
Using cached PyQt6-6.1.0.tar.gz (946 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
self.apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-install-4y93vt9z\pyqt6_e010daa9e104413b87d1d41abf25351d\project.py", line 60, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\pyqtbuild\builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I'm on 22.0.3 pip version and 3.10 python version
It seems like Qt6 needs to be installed on the OS before python package:
brew install pyqt5
export PATH="/opt/homebrew/opt/qt5/bin:$PATH"
The path update is the key as the builder is not finding something that the qmake needs.

Categories