GDGVIT/pip-gui

Issues during installation of application

Closed this issue · 9 comments

Hey @ayushpriya10 , I have encountered some issues during installation while working on feature enhancement in #25 . The error occured when I was trying to install the original version of this program following the instructions present in README. Please take a look below.

System details

  • Operating system : Fedora 32 (64bit) (5.6.16-300.fc32.x86_64 x86_64 x86_64 GNU/Linux)
  • Python version : Python 3.8.3
  • GCC version : gcc (GCC) 10.1.1 20200507 (Red Hat 10.1.1-1)

Reproduction Route

  • During installation from PyPI repository as non-privileged user
$ pip3 install pipgui
Defaulting to user installation because normal site-packages is not writeable
Collecting pipgui
  Using cached pipgui-1.3-py3-none-any.whl (2.5 MB)
Collecting PyQt5==5.10.1
  Downloading PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (107.8 MB)
     |██▌                             | 8.3 MB 367 kB/s eta 0:04:32ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1822, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1622, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1822, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3.8/site-packages/OpenSSL/SSL.py", line 1622, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 425, in _error_catcher
    yield
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 507, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "/usr/lib64/python3.8/http/client.py", line 454, in read
    n = self.readinto(b)
  File "/usr/lib64/python3.8/http/client.py", line 498, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib64/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 328, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 326, in recv_into
    raise timeout("The read operation timed out")
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 332, in run
    requirement_set = resolver.resolve(
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 467, in prepare_linked_requirement
    local_file = unpack_url(
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 255, in unpack_url
    file = get_http_url(
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 129, in get_http_url
    from_path, content_type = _download_http_url(
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 281, in _download_http_url
    for chunk in download.chunks:
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/progress_bars.py", line 166, in iter
    for x in it:
  File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/utils.py", line 15, in response_chunks
    for chunk in response.raw.stream(
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 529, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib64/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 430, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
  • During install as a local package using the GitHub repository
$ ls -lh
-rw-rw-r--. 1 neeraj neeraj  35K Jun 12 21:04 LICENSE.txt
-rw-rw-r--. 1 neeraj neeraj   54 Jun 12 21:04 MANIFEST.in
drwxrwxr-x. 6 neeraj neeraj 4.0K Jun 12 21:04 pipgui
drwxrwxr-x. 2 neeraj neeraj 4.0K Jun 12 21:04 readme
-rw-rw-r--. 1 neeraj neeraj 2.5K Jun 12 21:04 README.md
-rw-rw-r--. 1 neeraj neeraj   36 Jun 12 21:04 requirements.txt
-rw-rw-r--. 1 neeraj neeraj 1.6K Jun 12 21:28 setup.py

$ python3 setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running egg_info
writing pipgui.egg-info/PKG-INFO
writing dependency_links to pipgui.egg-info/dependency_links.txt
writing entry points to pipgui.egg-info/entry_points.txt
writing requirements to pipgui.egg-info/requires.txt
writing top-level names to pipgui.egg-info/top_level.txt
reading manifest file 'pipgui.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: manifest_maker: MANIFEST.in, line 2: unknown action 'Exclude'

writing manifest file 'pipgui.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pipgui
copying build/lib/pipgui/__init__.py -> build/bdist.linux-x86_64/wheel/pipgui
creating build/bdist.linux-x86_64/wheel/pipgui/Scraping
copying build/lib/pipgui/Scraping/packageList.py -> build/bdist.linux-x86_64/wheel/pipgui/Scraping
copying build/lib/pipgui/Scraping/pypiList.py -> build/bdist.linux-x86_64/wheel/pipgui/Scraping
copying build/lib/pipgui/Scraping/__init__.py -> build/bdist.linux-x86_64/wheel/pipgui/Scraping
copying build/lib/pipgui/Scraping/genreList.py -> build/bdist.linux-x86_64/wheel/pipgui/Scraping
copying build/lib/pipgui/Scraping/githubFile.py -> build/bdist.linux-x86_64/wheel/pipgui/Scraping
creating build/bdist.linux-x86_64/wheel/pipgui/Package_Management
copying build/lib/pipgui/Package_Management/__init__.py -> build/bdist.linux-x86_64/wheel/pipgui/Package_Management
copying build/lib/pipgui/Package_Management/installedList.py -> build/bdist.linux-x86_64/wheel/pipgui/Package_Management
copying build/lib/pipgui/Package_Management/outdatedList.py -> build/bdist.linux-x86_64/wheel/pipgui/Package_Management
copying build/lib/pipgui/__main__.py -> build/bdist.linux-x86_64/wheel/pipgui
copying build/lib/pipgui/refreshLists.py -> build/bdist.linux-x86_64/wheel/pipgui
creating build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/installScreen.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/__init__.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/progressScreen.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/startScreen.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/uninstallScreen.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
copying build/lib/pipgui/GUI/updateScreen.py -> build/bdist.linux-x86_64/wheel/pipgui/GUI
creating build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/outdatedPackageList.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/genreFile.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/genreListFile.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/genreTagFile.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/outdatedPackageList3.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/googledev.png -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/packageList3.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/pypi.txt -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/packageDictFile.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/db.txt -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
copying build/lib/pipgui/Resource_Files/packageList.json -> build/bdist.linux-x86_64/wheel/pipgui/Resource_Files
running install_egg_info
Copying pipgui.egg-info to build/bdist.linux-x86_64/wheel/pipgui-1.3-py3.8.egg-info
running install_scripts
adding license file "LICENSE.txt" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/pipgui-1.3.dist-info/WHEEL
creating 'dist/pipgui-1.3-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pipgui/__init__.py'
adding 'pipgui/__main__.py'
adding 'pipgui/refreshLists.py'
adding 'pipgui/GUI/__init__.py'
adding 'pipgui/GUI/installScreen.py'
adding 'pipgui/GUI/progressScreen.py'
adding 'pipgui/GUI/startScreen.py'
adding 'pipgui/GUI/uninstallScreen.py'
adding 'pipgui/GUI/updateScreen.py'
adding 'pipgui/Package_Management/__init__.py'
adding 'pipgui/Package_Management/installedList.py'
adding 'pipgui/Package_Management/outdatedList.py'
adding 'pipgui/Resource_Files/db.txt'
adding 'pipgui/Resource_Files/genreFile.json'
adding 'pipgui/Resource_Files/genreListFile.json'
adding 'pipgui/Resource_Files/genreTagFile.json'
adding 'pipgui/Resource_Files/googledev.png'
adding 'pipgui/Resource_Files/outdatedPackageList.json'
adding 'pipgui/Resource_Files/outdatedPackageList3.json'
adding 'pipgui/Resource_Files/packageDictFile.json'
adding 'pipgui/Resource_Files/packageList.json'
adding 'pipgui/Resource_Files/packageList3.json'
adding 'pipgui/Resource_Files/pypi.txt'
adding 'pipgui/Scraping/__init__.py'
adding 'pipgui/Scraping/genreList.py'
adding 'pipgui/Scraping/githubFile.py'
adding 'pipgui/Scraping/packageList.py'
adding 'pipgui/Scraping/pypiList.py'
adding 'pipgui-1.3.dist-info/LICENSE.txt'
adding 'pipgui-1.3.dist-info/METADATA'
adding 'pipgui-1.3.dist-info/WHEEL'
adding 'pipgui-1.3.dist-info/entry_points.txt'
adding 'pipgui-1.3.dist-info/top_level.txt'
adding 'pipgui-1.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel

$ pip3 install dist/*.whl
Defaulting to user installation because normal site-packages is not writeable
Processing ./dist/pipgui-1.3-py3-none-any.whl
Requirement already satisfied: sip in /home/neeraj/.local/lib/python3.8/site-packages (from pipgui==1.3) (5.3.0)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.9.1-py3-none-any.whl (115 kB)
Requirement already satisfied: PyQt5 in /usr/lib64/python3.8/site-packages (from pipgui==1.3) (5.13.2)
Requirement already satisfied: packaging in /home/neeraj/.local/lib/python3.8/site-packages (from sip->pipgui==1.3) (20.4)
Requirement already satisfied: toml in /home/neeraj/.local/lib/python3.8/site-packages (from sip->pipgui==1.3) (0.10.1)
Collecting soupsieve>1.2
  Using cached soupsieve-2.0.1-py3-none-any.whl (32 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3.8/site-packages (from packaging->sip->pipgui==1.3) (2.4.7)
Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from packaging->sip->pipgui==1.3) (1.14.0)
Installing collected packages: soupsieve, beautifulsoup4, pipgui
Successfully installed beautifulsoup4-4.9.1 pipgui-1.3 soupsieve-2.0.1

$ pipgui
Traceback (most recent call last):
  File "/home/neeraj/.local/bin/pipgui", line 5, in <module>
    from pipgui.__main__ import main
  File "/home/neeraj/.local/lib/python3.8/site-packages/pipgui/__init__.py", line 1, in <module>
    from . import mainGUI
ImportError: cannot import name 'mainGUI' from partially initialized module 'pipgui' (most likely due to a circular import) (/home/neeraj/.local/lib/python3.8/site-packages/pipgui/__init__.py)

I already had PyQt5 and other related dependencies installed on my system.

Please take a look above and let me know if you need any more information for debugging.

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.68. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Can you try:
pip3 install pipgui --user

This output after running above command

$ pip3 install pipgui --user
Collecting pipgui
  Using cached pipgui-1.3-py3-none-any.whl (2.5 MB)
Collecting PyQt5==5.10.1
  Downloading PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (107.8 MB)
     |████████████████████████████████| 107.8 MB 17 kB/s 
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.9.1-py3-none-any.whl (115 kB)
ERROR: Could not find a version that satisfies the requirement sip==4.19.8 (from pipgui) (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0)
ERROR: No matching distribution found for sip==4.19.8 (from pipgui)

BTW, --user is the default option for non-privileged user.

Well there are instances when explicitly using a flag helps. Like for example here I believe the version is discontinued. We might have to port sip to 5.x and that's going to take more effort. I'll take a look at upgrading the requirements. Meanwhile you can preemptively try if you can see whether the application works with a newer version of the sip package.

@ayushpriya10 , I tried that as well. I have explained the approach in local install step in issue description. That didn't work either and I got this error.

$ pipgui
Traceback (most recent call last):
  File "/home/neeraj/.local/bin/pipgui", line 5, in <module>
    from pipgui.__main__ import main
  File "/home/neeraj/.local/lib/python3.8/site-packages/pipgui/__init__.py", line 1, in <module>
    from . import mainGUI
ImportError: cannot import name 'mainGUI' from partially initialized module 'pipgui' (most likely due to a circular import) (/home/neeraj/.local/lib/python3.8/site-packages/pipgui/__init__.py)

I removed the version requirements in setup.py and then continued with the installation. The sip library in this instance was at version 5.3.0.
Do let me know if you think there is any error in my approach for installing the program locally.

But did you remove the broken install? The circular import seems like that you now have two install candidates which are importing each other's packages potentially.

Nevertheless, I'll take a look. If you find a solution in the meantime, I'd love to review a PR.

But did you remove the broken install?

Yes. Each reinstall was done after a cleanup of previously installed instance of the package.

Nevertheless, I'll take a look. If you find a solution in the meantime, I'd love to review a PR.

I'll try. : )

Okay, understood. Thanks for the report, we'll look into it.

@nnishant776 Are you still working on this? I would like to help.