-1

When I type "pip install PyDictionary" I reserve this error. I also tryed installing the package by typing "python(3) -m pip install PyDictionary" I installed this package before without problems with (python 3.10) but not o n python 3.10.64

enter code here
PS C:\Users\danie\Desktop\pythonProject> pip install PyDictionary
Collecting PyDictionary
  Using cached PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting goslate
  Using cached goslate-1.5.2-py3-none-any.whl
Requirement already satisfied: requests in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (2.27.1)
Requirement already satisfied: click in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (8.0.4)
Collecting bs4
  Using cached bs4-0.0.1-py3-none-any.whl
Requirement already satisfied: beautifulsoup4 in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from bs4->PyDictionary) (4.10.0)
Requirement already satisfied: colorama in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from click->PyDictionary) (0.4.4)
Collecting futures
  Using cached futures-3.0.5.tar.gz (25 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 "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 14, in <module>
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 18, in <module>
          from setuptools.dist import Distribution
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 32, in <module>
          from setuptools.extern.more_itertools import unique_everseen
        File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked      
        File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
        File "<frozen importlib._bootstrap>", line 571, in module_from_spec
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\extern\__init__.py", line 52, in create_module
          return self.load_module(spec.name)
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\extern\__init__.py", line 37, in load_module
          __import__(extant)
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_vendor\more_itertools\__init__.py", line 1, in <module>
          from .more import *  # noqa
        File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_vendor\more_itertools\more.py", line 5, in <module>
          from concurrent.futures import ThreadPoolExecutor
        File "C:\Users\danie\AppData\Local\Temp\pip-install-cvmk7t7g\futures_bc0e05fe70bf443a80089b769091bce8\concurrent\futures\__init__.py", line 8, in <module>
          from concurrent.futures._base import (FIRST_COMPLETED,
        File "C:\Users\danie\AppData\Local\Temp\pip-install-cvmk7t7g\futures_bc0e05fe70bf443a80089b769091bce8\concurrent\futures\_base.py", line 357
          raise type(self._exception), self._exception, self._traceback
                                     ^
      SyntaxError: invalid 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.
  • 1
    I have also encountered the same problem. After some search I found the answer. Here is the [link](https://stackoverflow.com/a/73599382/18448214) to the solution. – zain.py Sep 04 '22 at 12:34

1 Answers1

1

There's an open issue on the repo currently: I'll attach the link here but give a quick explanation.

https://github.com/geekpradd/PyDictionary/issues/52

There's a dependency for the google translate aspect of the package that depends on Python 2 code. That's causing the package to fail to install on Python 3.10+ (In the dependency repo they explicitly declare that it won't work on Python 3+).

One of the answerers on the github issue said he found a workaround by installing futures before attempting to install PyDictionary

  • please put the relevant coded example in the reply. Github links tend to go dead over time. You can always include the link as additional reference. – jonathan Jun 03 '22 at 19:32