Got problem with setup.py when install ssl - python

I tried to install ssl package for my computer (Pop_OS 21.10) with the command python3 -m pip install ssl. Then pip returned this mess:
Processing ./ssl-1.16.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 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-req-build-765tgjcs/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.9/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.9/http/client.py", line 1391, in <module>
import ssl
File "/tmp/pip-req-build-765tgjcs/ssl/__init__.py", line 140
except SSLError, x:
^
SyntaxError: invalid syntax
Original exception was:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-765tgjcs/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
[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 have checked pip version (22.0.4) and setuptools (62.1.0), it seem normal.
What is the problem in here? How can I solve it?

Related

import versioneer gives SyntaxError on *MATCH_ARGS

python setup.py build --compiler=mingw32
Traceback (most recent call last):
File "setup.py", line 4, in <module>
import versioneer
File "/cygdrive/c/Users/Mansi/Downloads/cvxopt-1.3.0/versioneer.py", line 1194
"--always", "--long", *MATCH_ARGS],
^
SyntaxError: invalid syntax
Does anyone happen to know why this error is coming?

Python -- install Pyqt-fit -- python setup.py egg_info did not run successfully

I am trying to pip install pyqt-fit package from github (link), but it is not working. This is the command I used:
pip install -e git+https://github.com/PierreBdR/PyQt-fit.git#egg=pyqt-fit
I tried to update pip and update setuptools, but I kept encountering this error.
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 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\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\setuptools\__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "C:\Users\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\setuptools\extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\setuptools\dist.py", line 7, in <module>
from setuptools.command.install import install
File "C:\Users\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\setuptools\command\__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "C:\Users\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\setuptools\command\install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\carno\AppData\Local\Temp\pip-install-v9p8w_u9\distribute_1c733a25f7514182a5dea7b08d1ddb8a\pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
[end of output]
Any suggestions? or any other ways to install pyqt-fit? I really want to use its method to help with my data analysis

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

I can't install "httpclient" for python

My OS is Windows7 32bit & I use VScode and python 3.6 32bit
When I tried
C:\python>pip install client
Collecting httpclient
Using cached httpclient-0.0.2.zip
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.19.tar.gz
Extracting in C:\Users\Public\Documents\ESTsoft\CreatorTemp\tmptrynwiem
Traceback (most recent call last):
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 143, in use_setuptools
raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\setup.py", line 13, in <module>
use_setuptools()
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 125, in _do_download_build_egg(egg, tarball, to_dir)
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 99, in _build_egg_extractall(tar)
File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 467, in _extractallself.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\
The httplib module has been renamed to http.client in Python 3. You don't need to install http.client in python 3. It is pre-installed. So directly import it in your script as follows:
import http.client

Categories