pip install ez_setup error: invalid command 'egg_info' - python

I use pip install librosa but it returns error:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
C:\Users\forest\AppData\Local\Temp\pip-install-9kubnarv\audioread_290887eadf0e4e15aa16d5ec304ca97a\setup.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'egg_info'
[end of output]
I tryed to upgrade pip and setuptools but it's no use.And I found a way is pip install ez_setup but it still returns error:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'egg_info'
[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.
I can't understand how to do next.
Help me.I want this no errors.

Related

Pygraphviz on macOS not installing

I've been trying to install pygraphviz and have followed the following command from another post but it didn't seem to work.
pip install pygraphviz --install-option="--include-path=/Users/ahmedhamadto/PycharmProjects/Kaggle Titanic/venv/lib/python3.10/site-packages/pygments/lexers/graphviz.py" \
--install-option="--library-path=/Users/ahmedhamadto/PycharmProjects/Kaggle Titanic/venv/lib/python3.10/site-packages/pygments/lexers/graphviz.py"
I received the following error:
DEPRECATION: pygraphviz is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/11451
Running setup.py install for pygraphviz ... error
error: subprocess-exited-with-error
× Running setup.py install for pygraphviz did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --include-path not recognized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pygraphviz
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I need it for the program I am coding in an attempt to make flowcharts:
# Draw and display the fault tree diagram
pos = nx.drawing.nx_agraph.graphviz_layout(G)
nx.draw(G, pos, with_labels=True, node_shape='rectangle')
# Save the diagram to a file
plt.savefig(file_name, format="pdf")

unable to install pywebview

I try to install pywebview but it just gives me a long error: ERROR: Command errored out with exit status 1:
in general, I'm trying to find a way to wrap a website in a GUI but that I can modify the screen size and cut areas of the webpage(hiding the search bar for example)
update :
using pip install
windows 10 env,
error message -
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized

PYMC installation --fcompiler not recognized

I'm trying to install pymc on OSX Mountain lion.
I have installed gfortran (from http://gcc.gnu.org/wiki/GFortranBinaries#MacOS) and cloned pymc.
I tried what has previously been working: 'setup.py config --fcompiler=gfortran build', but this gives an error:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --fcompiler not recognized
If I just do: 'sudo python setup.py install' then I get this
.
.
.
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:16:
/usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
include
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
Any ideas what's going on?
Thanks,
Jen
Which version of PyMC are you trying to install, the current development version on GitHub master (PyMC 3) or the release version (PyMC 2.3)?
If you are trying to install PyMC 3, you do not need a Fortran compiler. You do need Theano, however. Can you try the following?
pip install --no-deps git+git://github.com/Theano/Theano.git
pip install --no-deps git+git://github.com/pymc-devs/pymc.git

Unable to install MySQL-python " invalid command 'egg_info' "

I'm getting a weird error after running
$ pip install mysql-python
Has anyone seen an error like this with "egg_info" being invalid?
I'm running OSX mountain lion
Downloading/unpacking MySQL-python
Using download cache from /Users/Marcus/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4.zip
Running setup.py egg_info for package MySQL-python
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6
Now working in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6/distribute-0.6.28
Building a Distribute egg in /Users/Marcus/sites/venv/build/MySQL-python
/Users/Marcus/sites/venv/build/MySQL-python/distribute-0.6.28-py2.7.egg
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6
Now working in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6/distribute-0.6.28
Building a Distribute egg in /Users/Marcus/sites/venv/build/MySQL-python
/Users/Marcus/sites/venv/build/MySQL-python/distribute-0.6.28-py2.7.egg
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/Marcus/sites/venv/build/MySQL-python
Storing complete log in /Users/Marcus/.pip/pip.log
Thanks
--- I'm getting this same error when I run
$ pip install django
You need distribute package which is now inside setuptools:
pip install --upgrade setuptools

Error installing with pip

Trying to uninstall a package installed with pip, I uninstall some and now pip don't work. I try to install pandas:
[sudo] pip install pandas
And this is the error:
Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages (from pandas)
Downloading/unpacking pytz (from pandas)
Downloading pytz-2013b.zip (535kB): 535kB downloaded
Running setup.py egg_info for package pytz
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
Complete output from command python setup.py egg_info:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/pytz
Storing complete log in /root/.pip/pip.log
I have Linux Mint Mate 15. How I can resolve this??
Update your setuptools installation with pip install -U setuptools.
Try installing distribute with pip install distribute.

Categories