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
Related
Collecting SelectMenu
Using cached SelectMenu-1.0.0b2.tar.gz (3.4 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
[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\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\setup.py", line 5, in <module>
from selectmenu import __author__, __version__
File "C:\Users\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\selectmenu\__init__.py", line 4, in <module>
from selectmenu.core import SelectMenu
File "C:\Users\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\selectmenu\core.py", line 6, in <module>
from prompt_toolkit.token import Token
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompt_toolkit\token.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Getting this error while trying to install a requirements folder. I have no idea what to do so far
I think I ran into a similar issue, it seems like this package is only available for python2 and I am running python3. Check if you have the same issue.
Source: https://pypi.org/project/SelectMenu/
EDIT: you might be able to make it run with python3 with the following hack at: https://github.com/alice1017/SelectMenu/issues/4#issuecomment-773841255
Downgrade prompt_toolkit to 1.0.14
pip install 'prompt_toolkit==1.0.14'
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
(some_virtual_env) # pip install channels
gives me:
Collecting channels
Using cached channels-2.0.2-py2.py3-none-any.whl
Collecting Django>=1.11 (from channels)
Using cached Django-1.11.10-py2.py3-none-any.whl
Collecting asgiref~=2.1 (from channels)
Using cached asgiref-2.1.5-py2.py3-none-any.whl
Collecting daphne~=2.0 (from channels)
Using cached daphne-2.0.3-py2.py3-none-any.whl
Requirement already satisfied: pytz in /root/.virtualenvs/codebench/lib/python2.7/site-packages (from Django>=1.11->channels)
Collecting async-timeout~=2.0 (from asgiref~=2.1->channels)
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iii9a6/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iii9a6/async-timeout/
I tried upgrade setuptools as described in: https://stackoverflow.com/a/36025294/646732
It didn't work.
Tried:
(test_python3) # apt-get install python3
(test_python3) # alias python=python3
(test_python3) # pip install async-timeout
(test_python3) # python -V
Python 3.5.2
(test_python3) # pip install async-timeout
It gives me:
Collecting async-timeout
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Dw6FjJ/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Dw6FjJ/async-timeout/
Not sure what else to check and install.
Run below command first
sudo pip install pathlib
then
pip install channels
I try to install library into my project using next way:
pip3 install -r requirements.txt
My requirements.txt contains:
six
Cython
git+https://github.com/ajelenak/pysaxon.git
But installations fails:
Collecting git+https://github.com/ajelenak/pysaxon.git (from -r /var/www/gost/gost/requirements.txt (line 20))
Cloning https://github.com/ajelenak/pysaxon.git to /tmp/pip-zkz6pq1u-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-zkz6pq1u-build/setup.py", line 8, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
What is wrong?
I am trying to install PyAutoGUI but every time i try i get the error message
C:\WINDOWS\system32>C:\Users\nicho\AppData\Local\Programs\Python\Python35-32\Scripts\pip install PyAutoGUI
Collecting PyAutoGUI
Using cached PyAutoGUI-0.9.33.zip
Collecting pymsgbox (from PyAutoGUI)
Using cached PyMsgBox-1.0.3.zip
Collecting PyTweening>=1.0.1 (from PyAutoGUI)
Using cached PyTweening-1.0.3.zip
Collecting Pillow (from PyAutoGUI)
Using cached Pillow-3.1.1-cp35-none-win32.whl
Collecting pyscreeze (from PyAutoGUI)
Using cached PyScreeze-0.1.8.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze\setup.py", line 6, in <module>
version=__import__('pyscreeze').__version__,
File "c:\users\nicho\appdata\local\temp\pip-build-jt08_ns2\pyscreeze\pyscreeze\__init__.py", line 21, in <module>
from PIL import Image
ImportError: No module named 'PIL'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze
Can anyone help me?
You should install the Python Image Library(PIL), using the command:
sudo pip install PIL --allow-external PIL --allow-unverified PIL
Check out the virtual environment for python packages. It is really user friendly in pycharm for example and you can test out packages before using up hard drive space.