I use pycharm ide for coding, But when I tried installing PyDictionary module it gave this error on console:
The system is running windows10 with Python version 3.10.2 with latest pip and setuptool. All necessary path variables are set and other modules import and install without issues. This case is happening only with python 3.10.2
Collecting PyDictionary
Using cached PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting goslate
Using cached goslate-1.5.2.tar.gz (16 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting bs4
Using cached bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting click
Using cached click-8.0.4-py3-none-any.whl (97 kB)
Requirement already satisfied: requests in c:\users\sysadmin\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (2.27.1)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting colorama
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting futures
Using cached futures-3.0.5.tar.gz (25 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[27 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\sysadmin\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 244, in <module>
monkey.patch_all()
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 169, in patch_for_msvc_specialized_compiler
patch_func(*msvc14('_get_vc_env'))
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 20, in <module>
import unittest.mock
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\unittest\mock.py", line 26, in <module>
import asyncio
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\asyncio\__init__.py", line 8, in <module>
from .base_events import *
File "C:\Users\sysadmin\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 18, in <module>
import concurrent.futures
File "C:\Users\sysadmin\AppData\Local\Temp\pip-install-ucxsouan\futures_c24a44afb56f439e8f819b7a8a5ff59d\concurrent\futures\__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "C:\Users\sysadmin\AppData\Local\Temp\pip-install-ucxsouan\futures_c24a44afb56f439e8f819b7a8a5ff59d\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.
I tried the same on windows command shell with admin privileges. But same. Anyone has the same issue?
For me upgrading setuptools solved it.
python3 -m pip install --upgrade pip setuptools
PyDictionary depends on goslate which is dependant on futures, since futures is not supported by Python 3 it causes error.
One way of preventing this is to install goslate directly from the GitHub Repository, here is the link. But you will not get the latest version.
First install goslate from GitHub Repository:
pip install -e git+https://github.com/yeahwhat-mc/goslate#egg=goslate
Then install PyDictionary:
pip install PyDictionary
Try going with wordhoard or py-dictionary
pip install wordhoard
pip install Py-Dictionary
and you can perform the operations. Below I have found the synonym of the word
inp_word = "name"
dict = Dictionary(inp_word,50)
#Py-dictionary
for i in dict.synonyms():
syn_words.append(i)
#wordhoard
for i in Synonyms(inp_word).find_synonyms():
syn_words.append(i)
print(set(syn_words))
Mostly both will have same results but I don't want to leave out things so only I am using combinedly
Related
I am trying to install the python package py-pde.
My current python version is 3.9.
I pip install using the command 'pip install py-pde' on the terminal.
However, when I try to install it on my IDE - PyCharm - I get this error:
Collecting py-pde
Using cached py_pde-0.27.1-py3-none-any.whl (269 kB)
Requirement already satisfied: matplotlib>=3.1.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from py-pde) (3.6.2)
Collecting numba>=0.56.0
Using cached numba-0.56.4.tar.gz (2.4 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 51, in <module>
_guard_py_ver()
File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 48, in _guard_py_ver
raise RuntimeError(msg.format(cur_py, min_py, max_py))
RuntimeError: Cannot install on Python version 3.11.0; only versions >=3.7,<3.11 are supported.
[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.
Any ideas what's wrong here?
Specifically, it says can't install on Python 3.11, even though I checked my python version using pip --version to be 3.9.
Not sure what's wrong. Help appreciated.
Should be as simple as alt+ctrl+s to go to settings.
Then navigate to Project: "Your project" >> Python Interpreter. Then just browse to the interpreter you want to use instead of 3.11.
Edit: Here's a link to JetBrains (PyCharm parent company) documentation that covers changing your interpreter.
I was trying to install conda using pip in Command Prompt, I search Everywhere related to this error but I found Nothing that can help me with the problem.
pip install conda
but I got this error:
Collecting conda
Using cached conda-4.3.16.tar.gz (299 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pycosat>=0.6.1 in c:\users\asus\appdata\local\programs\python\python37\lib\site-packages
(from conda) (0.6.3)
Requirement already satisfied: requests>=2.12.4 in c:\users\asus\appdata\local\programs\python\python37\lib\site-package
s (from conda) (2.26.0)
Collecting ruamel.yaml>=0.11.14
Using cached ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
Collecting conda
Using cached conda-4.3.13.tar.gz (370 kB)
Preparing metadata (setup.py) ... done
Using cached conda-4.2.7.tar.gz (235 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\ASUS\AppData\Local\Temp\pip-install-89w5h0p1\conda_ae1fc222c1a04f2ca50dbd3c45396cdf\setup.py", line 32, in <module>
from conda._vendor.auxlib import packaging # NOQA
ModuleNotFoundError: No module named 'auxlib'
[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.
WARNING: There was an error checking the latest version of pip.
Please help me to find a solution for this error.
I found a solution to this problem.
the problem in line
ModuleNotFoundError: No module named 'auxlib'
so I just install auxlib by using
pip install auxlib
and then my problem was resolved.
pip is not the correct way to install conda
See the pypi page
WARNING: Using pip install conda or easy_install conda will not give you conda as a standalone application. Currently supported install methods include the Anaconda installer and the miniconda installer.
I’ve been running into the same error message with multiple libraries, not all libraries but randomly.
All I could find here and on other equation boards was that I need to upgrade my pip, it’s upgraded to the max (22.1.2) but I still get the same error, no with the added “WARNING: There was an error checking the latest version of pip.”
So this is what I get when I try to install pyinstaller
pip install pyinstaller
Collecting pyinstaller
Using cached pyinstaller-5.1-py3-none-win_amd64.whl (1.2 MB)
Collecting pefile>=2017.8.1
Using cached pefile-2022.5.30.tar.gz (72 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: pywin32-ctypes>=0.2.0 in d:\program files\spyder\pkgs (from pyinstaller) (0.2.0)
Requirement already satisfied: setuptools in d:\program files\spyder\pkgs (from pyinstaller) (61.2.0)
Collecting altgraph
Using cached altgraph-0.17.2-py2.py3-none-any.whl (21 kB)
Collecting pyinstaller-hooks-contrib>=2021.4
Using cached pyinstaller_hooks_contrib-2022.6-py2.py3-none-any.whl (231 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 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\tomer\AppData\Local\Temp\pip-install-01zbu624\future_a521b799a85941e08b0fd94b59c7d89a\setup.py", line 86, in <module>
import src.future
ModuleNotFoundError: No module named 'src'
[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.
WARNING: There was an error checking the latest version of pip.
Thank you for your help
Im trying to install tensorflow, using pip install tensorflow. I can install other packages but tensorflow is just not working. This is the error i get:
C:\Users\sebas>python -m pip install tensorflow
Collecting tensorflow
Using cached tensorflow-2.8.0-cp37-cp37m-win_amd64.whl (437.9 MB)
Collecting h5py>=2.9.0
Using cached h5py-3.6.0-cp37-cp37m-win_amd64.whl (2.8 MB)
Collecting tensorboard<2.9,>=2.8
Using cached tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
Collecting termcolor>=1.1.0
Using cached termcolor-1.1.0.tar.gz (3.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string", line 36, in <module>
File "pip-setuptools-caller>", line 34, in <module>
File "C:\Users\sebas\AppData\Local\Temp\pip-install-vmfvacm3 \termcolor_be9b831904ce413daecad52b36f017aa\setup.py", line 35, in <module>
from termcolor import VERSION
ModuleNotFoundError: No module named 'termcolor'
[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. \
For people which will have similiar problem (on Windows)
Main problem is termcolor.
It seems it tries to import VERSION from new version (before instalation) but it behaves like it would load older versions which doesn't have VERSION.
You may download termcolor as file .whl from
Unofficial Windows Binaries for Python Extension Packages
and try to install
pip install termcolor‑1.1.0‑py2.py3‑none‑any.whl
If termcolor‑1.1.0‑py2.py3‑none‑any.whl can no longer be found on Unofficial Windows Binaries for Python Extension Packages you may find it here termcolor-whl · PyPI
I am trying to install the ant module from the command line and I get this error:
C:\Users\97252>pip install ant
Collecting ant
Using cached ant-0.1.0.tar.gz (18 kB)
Collecting msgpack-python==0.1.10
Using cached msgpack-python-0.1.10.tar.gz (48 kB)
Collecting pyserial==2.5
Using cached pyserial-2.5.tar.gz (106 kB)
WARNING: Generating metadata for package pyserial produced metadata for project name pyserial-py3k. Fix your #egg=pyserial fragments.
ERROR: Requested pyserial-py3k from https://files.pythonhosted.org/packages/c3/9c/9f97e7749c2373031e5dab6e47adab3eabbd5720615d98845ff8bad5b273/pyserial-2.5.tar.gz#sha256=eddd22280e0dac0888c6cddd8906ebd902fa42467fee151c43ecde4196bbf511 (from ant) has different name in metadata: 'pyserial-py3k'
When I am trying to install it through the pyCharm IDE, I get this error:
Collecting ant
Using cached
https://files.pythonhosted.org/packages/7e/9a/672711e3e9e264d7eee6048945f497d9fa9b311877f64fb74a7f297837da/ant-0.1.0.tar.gz
Collecting distribute (from ant)
Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\dist.py", line 7, in <module>
from setuptools.command.install import install
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\
Please help me.
You need to upgrade your setuptools by entering the command:
pip install --upgrade setuptools