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
Related
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
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.
Collecting playsound
Using cached playsound-1.3.0.tar.gz (7.7 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 14, in <module>
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\__init__.py", line 12, in <module>
from setuptools.extension import Extension
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\extension.py", line 7, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\dist.py", line 16, in <module>
import pkg_resources
File "C:\Users\sunka\anaconda3\lib\site-packages\pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
[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.
After searching errors for a long time I came up with this solution; But it depends on setuptools which may be incompatible for different packages
First do;
pip3 install --upgrade setuptools
NEXT;
pip3 install playsound
pip install playsound
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
I am learning Python and the documentation I am following suggested installing Firebird. I ran sudo pip install fdb.
I saw a build directory which I understand just contains the source code and not the binaries so I deleted that. When I do pip freeze | grep fdb, I cannot find Firebird.
I tried running sudo pip install fdb again and I am getting this error now (and the build directory is returning):
Downloading/unpacking fdb
Downloading fdb-0.9.9.tar.gz (481Kb): 481Kb downloaded
Running setup.py egg_info for package fdb
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>
from fdb import __version__
File "fdb/__init__.py", line 23, in <module>
from fdb.fbcore import *
File "fdb/fbcore.py", line 26, in <module>
from . import ibase
File "fdb/ibase.py", line 1164, in <module>
isc_attach_database = fb_library.isc_attach_database
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/nayef/Documents/Django/build/fdb/setup.py", line 7, in <module>
from fdb import __version__
File "fdb/__init__.py", line 23, in <module>
from fdb.fbcore import *
File "fdb/fbcore.py", line 26, in <module>
from . import ibase
File "fdb/ibase.py", line 1164, in <module>
isc_attach_database = fb_library.isc_attach_database
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, isc_attach_database): symbol not found
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/nayef/Documents/Django/build/fdb
Storing complete log in /Users/nayef/Library/Logs/pip.log
What am I doing wrong here? I'm not sure what's wrong with pip. I never faced any issues with it.
This isn't pip failing, this is the fdb package installation failing.
It seems you have some drivers missing, specifically, the firebird header files.
Do you have firebird installed? Make sure you install the Python bindings only after the driver has been installed.