Open Krishna-aishwarya opened 2 years ago
I am also experiencing this
Yep. Up to date pip and setuptools, same error.
same
Ditto, using pipenv
Pinging @geekpradd @bunchesofdonald @hpanago @morgansliman @njvrzm -
PyDictionary appears to be uninstallable on Python 3.10.
If the repo is no longer being maintained, would it be possible to add someone here to the project to help get it fixed?
I don't have any privileges on this repo. But I did some debugging I think the actual issue here is that goslate
depends on futures
, and futures >=3.0.0 isn't installable on python3 at all. The pypi page calls this out saying It does not work on Python 3 due to Python 2 syntax being used in the codebase. Python 3 users should not attempt to install it, since the package is already included in the standard library.
-- https://pypi.org/project/futures/
I am able to work around the issue by installing futures <3.0.0 before installing PyDictionary:
$ docker run --rm -it --entrypoint=/bin/bash python:3.10
root@7acd642446ca:/# pip install 'futures<3.0.0'
Collecting futures<3.0.0
Downloading futures-2.2.0-py2.py3-none-any.whl (16 kB)
Installing collected packages: futures
Successfully installed futures-2.2.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@7acd642446ca:/# pip install PyDictionary
Collecting PyDictionary
Downloading PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting requests
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 KB 5.9 MB/s eta 0:00:00
Collecting goslate
Downloading goslate-1.5.2.tar.gz (16 kB)
Preparing metadata (setup.py) ... done
Collecting bs4
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py) ... done
Collecting click
Downloading click-8.1.2-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 31.6 MB/s eta 0:00:00
Collecting beautifulsoup4
Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 KB 52.0 MB/s eta 0:00:00
Requirement already satisfied: futures in /usr/local/lib/python3.10/site-packages (from goslate->PyDictionary) (2.2.0)
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 KB 19.8 MB/s eta 0:00:00
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.0/139.0 KB 55.7 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.2/149.2 KB 53.2 MB/s eta 0:00:00
Collecting soupsieve>1.2
Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Building wheels for collected packages: bs4, goslate
Building wheel for bs4 (setup.py) ... done
Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1272 sha256=7fe4ee2fd5d583484d02df52a16985d478b2dffb0ce0091ab87f5c2a51460c75
Stored in directory: /root/.cache/pip/wheels/25/42/45/b773edc52acb16cd2db4cf1a0b47117e2f69bb4eb300ed0e70
Building wheel for goslate (setup.py) ... done
Created wheel for goslate: filename=goslate-1.5.2-py3-none-any.whl size=11436 sha256=a585bd7bea3b5530a3f2c80bc81b1f74c0fb3e3a1af7d034d2dfac75ae48a890
Stored in directory: /root/.cache/pip/wheels/60/70/49/b223667b589e6efe25bedf77aaa99c7c1a3149bf6f2198f7ae
Successfully built bs4 goslate
Installing collected packages: certifi, urllib3, soupsieve, idna, goslate, click, charset-normalizer, requests, beautifulsoup4, bs4, PyDictionary
Successfully installed PyDictionary-2.0.1 beautifulsoup4-4.11.1 bs4-0.0.1 certifi-2021.10.8 charset-normalizer-2.0.12 click-8.1.2 goslate-1.5.2 idna-3.3 requests-2.27.1 soupsieve-2.3.2.post1 urllib3-1.26.9
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@7acd642446ca:/# python
Python 3.10.4 (main, Apr 20 2022, 18:15:27) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyDictionary import PyDictionary
>>> dictionary = PyDictionary()
>>> print(dictionary.meaning("indentation"))
{'Noun': ['a concave cut into a surface or edge (as in a coastline', 'the formation of small pits in a surface as a consequence of corrosion', 'the space left between the margin and the start of an indented line', 'the act of cutting into an edge with toothlike notches or angular incisions']}
Simple usage appears to be working as expected, but it does appear that Google translation is broken (which uses goslate):
>>> print(dictionary.translate("Range",'es'))
Invalid Word
None