Error: "metadata generation failed", can't install Artic Module - python

I am trying to get started with downloading this project: https://github.com/sadighian/crypto-rl
And I've downloaded the packages in the requirements file but I can't figure out why the artic package won't download. I am getting this error:
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [312 lines of output]
/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [269 lines of output]
…
error: Command "/opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/_build_env/bin/llvm-ar rcs build/temp.macosx-10.9-x86_64-3.9/libnpymath.a build/temp.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/npy_math.o build/temp.macosx-10.9-x86_64-3.9/build/src.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/ieee754.o build/temp.macosx-10.9-x86_64-3.9/build/src.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/npy_math_complex.o build/temp.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/halffloat.o" failed with exit status 127
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
subprocess.check_call(cmd)
File "/Users/aishahalane/opt/anaconda3/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/aishahalane/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/tmph3_m5ewf', '--quiet', 'numpy<=1.18.4']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/pip-req-build-s7mgwt47/setup.py", line 59, in <module>
setup(
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 154, in setup
_install_setup_requires(attrs)
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 148, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/dist.py", line 812, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 771, in resolve
dist = best[req.key] = env.best_match(
File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1056, in best_match
return self.obtain(req, installer)
File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1068, in obtain
return installer(requirement)
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/dist.py", line 883, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/Users/aishahalane/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/tmph3_m5ewf', '--quiet', 'numpy<=1.18.4']' returned non-zero exit status 1.
[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.
How do I solve this problem?

I had this error while trying to install dotenv. With this command:
pip install dotenv
For anyone facing this error with dotenv. The right command actually is:
pip install python-dotenv

I faced a similar issue, due a recent change in pip. I solved it by adding the following to the installation command:
--use-deprecated=backtrack-on-build-failures
E.g. instead of pip install numpy I now ran:
pip install numpy --use-deprecated=backtrack-on-build-failures

I had the same problem with metadata-generation-failed. This GitHub issue comment helped me (Ubuntu 18.04):
sudo apt-get install python-dev
sudo apt-get install build-essential
python -m pip install -U pip or python3 -m pip install -U pip
pip3 install --upgrade setuptools

pip install numpy --use-deprecated=legacy-resolver can actually help, but there will be a red warning: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. anyway it solve my problem!

Related

pip install lanms package issues

I am trying to install a python package (Via pycharm) and I get the following error. How do I resolve this issue. Thanks.
pip install lanms==1.0.2
Collecting lanms==1.0.2
Using cached lanms-1.0.2.tar.gz (973 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 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\hello\AppData\Local\Temp\pip-install-0fm0m1ax\lanms_f1f4c8d9787c4f8ab5a30a96423d846e\setup.py", line 27, in <m
odule>
if subprocess.call(['make', '--always-make','-C', BASE_DIR]) != 0:
File "C:\Users\hello\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\hello\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\hello\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
[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 have already upgraded setuptools, wheel and pip as below.
pip 22.2.2
setuptools 65.3.0
wheel 0.37.1

Require help installing pyqt6

I have been trying to install pyqt6 on my linux device!
tried running:
pip install pyqt6
pip3 install pyqt6
python -m pip install pyqt6
python3 -m pip install pyqt6
and the variations of such commands. I also tried updating pip and python to latest versions it would give me (python 3.9.2 and pip 22.1.2)
error i get when installing pyqt6 is as follows:
Defaulting to user installation because normal site-packages is not writeable
Collecting pyqt6
Using cached PyQt6-6.3.1.tar.gz (1.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "/home/user1/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user1/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/user1/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/user1/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 584, in setup
self.apply_user_defaults(tool)
File "project.py", line 67, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-lb2ttoa7/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[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 help would be appreciated
edits:
to answer comments (since i replied there by accident instead of updating:
unsure what linux distro i'm running since it's the linux de available on chromebooks, if there's an official package for it I don't know what it is.
link 1 doesn't help just recommends i try steps i've done already such as updating pip

MySQL pip3 install error: metadata-generation-failed

Ive tried updating pip and installing different packages but nothing seems to work. im not sure if i have to run a command in konsole or alacritty but any help would be appreciated. i use fedora btw
sh-5.1$ pip3 install mysql
Defaulting to user installation because normal site-packages is not writeable
Collecting mysql
Using cached mysql-0.0.3-py3-none-any.whl (1.2 kB)
Collecting mysqlclient
Using cached mysqlclient-2.1.1.tar.gz (88 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/bin/sh: line 1: mysql_config: command not found
/bin/sh: line 1: mariadb_config: command not found
/bin/sh: line 1: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-lol73zmo/mysqlclient_d4096e3cc1ee4a6fbc53886cb9de5a17 /
setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-lol73zmo/mysqlclient_d4096e3cc1ee4a6fbc53886cb9de5a17
/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-lol73zmo/mysqlclient_d4096e3cc1ee4a6fbc53886cb9de5a17
/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[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.
before installing you have to resolve dependencies .
sudo apt-get install python3-dev libmysqlclient-dev
then inside a virtual environment:
pip3 install mysqlclient
then
pip3 install mysql
it should work

Getting "error while generating package metadata" when installing TkFontAwesome

I'm trying to install TkFontAwesome using python -m pip install tkfontawesome, but always get the following error:
Collecting tkfontawesome
Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting tksvg==0.7.4
Using cached tksvg-0.7.4.tar.gz (50 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Installing dependency cmake... Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\myuser\AppData\Local\Temp\pip-install-2krbeh5s\tksvg_7491a69795da43779e9e71e527849349\setup.py", line 62, in <module>
sp.call(["pacman", "--needed", "--noconfirm", "-S", "mingw-w64-x86_64-{}".format(dep)]) # , stdout=sp.PIPE)
File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\myuser\AppData\Local\Programs\Thonny\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
[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.
Never had any problems installing packages using pip before. The file subprocess.py IS in \Thonny\lib\ if this WinError 2 means that.
I'm using:
Python 3.7.7
pip 22.0.3
Tk 8.6.9
Thonny 3.2.7
Windows 10
So far i've tried:
to update my pip and setuptools (they're already up-to-date)
to install TkFontAwesome using ez_setup
to install TkFontAwesome using --use-deprecated=backtrack-on-build-failures
No use. Anyone have any ideas what to do next? Thanks in advance.
Try add this after your pip3 install package:
--use-deprecated=backtrack-on-build-failures
eg, if you want:
pip3 install imageAI
then:
pip3 install imageAI --use-deprecated=backtrack-on-build-failures
copy from there.

"pip install matplotlib":"“python setup.py egg_info” failed with error code 1" while installing matplotlib

I'm new to python. While installing matplotlibin command prompt, it's throwing below error
Command used: pip install matplotlib
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\
Below attached screenshot for the command prompt. Can someone please advise on how to solve this?
C:\Users\Prasanth>pip install matplotlib
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/be/06/81367951cc50695830482eacefdc8289c68770db166a4d4283e7eac22dee/matplotlib-3.2.0.tar.gz
Complete output from command python setup.py egg_info:
WARNING: The wheel package is not available.
Command "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\Scripts\python.exe C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pep517\_in_process.py prepare_metadata_for_build_wheel C:\Users\Prasanth\AppData\Local\Temp\tmpauafujib" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-wheel-ybn9_t9v\numpy
Traceback (most recent call last):
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\Prasanth\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\Prasanth\\PycharmProjects\\Classess_Test\\venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Prasanth\\AppData\\Local\\Temp\\tmp482ludrm', '--quiet', 'numpy>=1.11']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\setup.py", line 232, in <module>
setup(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\dist.py", line 684, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
return installer(requirement)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\dist.py", line 743, in fetch_build_egg
return fetch_build_egg(self, req)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['C:\\Users\\Prasanth\\PycharmProjects\\Classess_Test\\venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Prasanth\\AppData\\Local\\Temp\\tmp482ludrm', '--quiet', 'numpy>=1.11']' returned non-zero exit status 1.
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.2.0]
python: yes [3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC
v.1916 32 bit (Intel)]]
platform: yes [win32]
sample_data: yes [installing]
tests: no [skipping due to configuration]
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: no [Mac OS-X only]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\
Most of the time this problem is because of old version of the setuptools. So you cand upgrade it with below code:
pip install --upgrade setuptools
and also try to open your CMD as an administrator.
You can also simply install your package by Conda. You just need to run one of the following:
conda install -c conda-forge matplotlib
conda install -c conda-forge/label/testing matplotlib
conda install -c conda-forge/label/testing/gcc7 matplotlib
conda install -c conda-forge/label/matplotlib_rc matplotlib
conda install -c conda-forge/label/gcc7 matplotlib
conda install -c conda-forge/label/broken matplotlib
conda install -c conda-forge/label/rc matplotlib
conda install -c conda-forge/label/cf201901 matplotlib
conda install -c conda-forge/label/broken-test matplotlib

Categories

Resources