Failing to install Sparkmagic using pip - python

I am trying to install sparkmaic in jupyter notebook through pip but getting below error:
Command:
pip install sparkmagic
error:
Collecting gssapi>=1.6.0
Using cached gssapi-1.8.1.tar.gz (94 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
/bin/sh: 1: krb5-config: not found
Traceback (most recent call last):
File "/home/e004255/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/e004255/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/e004255/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-guoi_e0p/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-guoi_e0p/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-guoi_e0p/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 109, in <module>
File "<string>", line 22, in get_output
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'krb5-config --libs gssapi' returned non-zero exit status 127.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

It looks like your system is missing a tool named krb5-config. You might be able to install it with:
sudo apt install krb5-config

Thanks #bernhard
but, I had to install dev tools too (ubuntu 20.04).
sudo apt-get install libkrb5-dev

Related

How to fix pip install openai error: subprocess-exited-with-error

I installed the openai package, but there was an error. I have no idea about this error. The Python version is 3.11.1, and the pip version is 22.3.1.
Collecting openai
Using cached openai-0.26.0.tar.gz (54 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "C:\Users\chase\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pep517\in_process main()
File "C:\Users\chase\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chase\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chase\AppData\Local\Temp\pip-build-env-b5meduhi\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chase\AppData\Local\Temp\pip-build-env-b5meduhi\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\chase\AppData\Local\Temp\pip-build-env-b5meduhi\overlay\Lib\site-packages\setuptools\build_meta.py", line 485, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chase\AppData\Local\Temp\pip-build-env-b5meduhi\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 13, in <module>
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 1031: illegal multibyte sequence
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I checked the pip and python versions. There seems to be no problem with the version.

I cannot install pyopenjtalk "Getting requirements to build wheel did not run successfully."

I've been working on a VR AI chat bot however the one dependency I need is pyopenjtalk and it simply refuses to install.
Collecting pyopenjtalk
Using cached pyopenjtalk-0.3.0.tar.gz (1.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
_CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
Traceback (most recent call last):
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
main()
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 153, in <module>
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 1440, 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: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I assume the "FileNotFoundError: [WinError 2] The system cannot find the file specified" is the issue but I have no idea what file is not being found.
Can someone please help me as to why this keeps breaking?
I've tried everything from reinstalling python entirely, using different command lines, reinstalling cmake, cython and also ensuring I had C/C++ compilers which was specified in the requirements however it still does not install.

How do I build wheels for pypotrace?

I tried to run Junferno's DesmosBezierRenderer, and when it came to installing the requirements it stated that it failed building wheels for pypotrace. I'm running MacOS.
Comes with the error of: ERROR: Could not build wheels for pypotrace, which is required to install pyproject.toml-based projects
Error Message:
× Building wheel for pypotrace (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [44 lines of output]
A setup.py file already exists. Using it.
Traceback (most recent call last):
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-install-e2vj6x74/pypotrace_45b34c6b58a74021a36a306bbb164906/setup.py", line 28, in <module>
build(setup_kwargs)
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-install-e2vj6x74/pypotrace_45b34c6b58a74021a36a306bbb164906/build.py", line 19, in build
extra_compile_args = pkg_config("libagg", '--cflags')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-install-e2vj6x74/pypotrace_45b34c6b58a74021a36a306bbb164906/build.py", line 11, in pkg_config
return subprocess.check_output(["pkg-config", command, pkg_name]).decode(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 465, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 546, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1022, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1899, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
Traceback (most recent call last):
File "/Users/e/DesmosBezierRenderer/env/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/Users/e/DesmosBezierRenderer/env/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/e/DesmosBezierRenderer/env/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-build-env-uj1ao3bb/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 56, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-build-env-uj1ao3bb/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 85, in make_in
wb.build(target_dir=directory)
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-build-env-uj1ao3bb/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 118, in build
self._build(zip_file)
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-build-env-uj1ao3bb/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 179, in _build
self._run_build_command(setup)
File "/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-build-env-uj1ao3bb/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 217, in _run_build_command
subprocess.check_call(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/Richie/DesmosBezierRenderer/env/bin/python3.11', '/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-install-e2vj6x74/pypotrace_45b34c6b58a74021a36a306bbb164906/setup.py', 'build', '-b', '/private/var/folders/8x/64jyxcds3rv4v2v4vt787bcc0000gq/T/pip-install-e2vj6x74/pypotrace_45b34c6b58a74021a36a306bbb164906/build']' 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: Failed building wheel for pypotrace
Failed to build pypotrace
ERROR: Could not build wheels for pypotrace, which is required to install pyproject.toml-based projects
I've tried pip3 install wheel, expecting it to work and I've tried sudo apt-get install build-essential python-dev-is-python3 libagg-dev libpotrace-dev pkg-config but it caused another error.
Help would be appreciated, thank you!

How do I properly install Nethack Learning Environment?

Trying to install Nethack Learning Environment (nle) according to their github: https://github.com/facebookresearch/nle
I am running windows 10 x64. I successfully installed all required packages (conda, cmake, cuda, gym, stable-baselines3, even graphviz which someone online said would help) and still return an error when I execute the following:
(nle) C:\Users\g>pip install nle
I get the following error:
Collecting nle
Using cached nle-0.8.1.tar.gz (6.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
Traceback (most recent call last):
File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\g\miniconda3\envs\nle\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\g\AppData\Local\Temp\pip-build-env-ahobsdbu\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 127, in <module>
File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\g\miniconda3\envs\nle\lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\g\miniconda3\envs\nle\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: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I have even tried installing without the conda environment, via
C:\Users\g>pip install nle
Which returns the following error:
Collecting nle
Using cached nle-0.8.1.tar.gz (6.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\g\miniconda3\python.exe' 'C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\g\AppData\Local\Temp\tmp4okewis9'
cwd: C:\Users\g\AppData\Local\Temp\pip-install-b2kh8tw6\nle_afe88c6035c142eab966b05f6aa62307
Complete output (25 lines):
Traceback (most recent call last):
File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 349, in <module>
main()
File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 117, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\g\AppData\Local\Temp\pip-build-env-k07q7h5y\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 127, in <module>
File "C:\Users\g\miniconda3\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\g\miniconda3\lib\subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\g\miniconda3\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\g\miniconda3\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e0/18/f6e78119aa5ab5bc5edffa817e3748100f47b96ca8afb3b39659629b906a/nle-0.8.1.tar.gz#sha256=ab20bf3ef72f79891c70fa0d99abdd41ed77784c0f884c5e9116c552708950a5 (from https://pypi.org/simple/nle/) (requires-python:>=3.5). Command errored out with exit status 1: 'C:\Users\g\miniconda3\python.exe' 'C:\Users\g\miniconda3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' get_requires_for_build_wheel 'C:\Users\g\AppData\Local\Temp\tmp4okewis9' Check the logs for full command output.
It then appears to retry installing the package and of course gets stuck at the same point, spitting out the same error.
List of other commands I have tried:
pip install --no-cache-dir nle
pip install ez_setup
pip install --upgrade setuptools
Results:
Same error as before, all three times

Cannot pip install atlassian-python-api due to subprocess-exited-with-error

I am trying to install the atlassian-python-api using pip but upon trying to do so, I get the following error: Getting requirements to build wheel ... error: subprocess-exited-with-error.
I am running Python version 3.10.0a2 installed through pyenv-win. I am not exactly sure what could be causing this, but here is my full command output for a better understanding:
(venv) PS > pip install atlassian-python-api
Collecting atlassian-python-api
Using cached atlassian-python-api-3.20.1.tar.gz (131 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
Traceback (most recent call last):
File "venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 11, in <module>
setup(
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\__init__.py", line 154, in setup
_install_setup_requires(attrs)
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\__init__.py", line 143, in _install_setup_requires
dist = MinimalDistribution(attrs)
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\__init__.py", line 135, in __init__
super().__init__(filtered)
File "AppData\Local\Temp\pip-build-env-mzcohtxb\overlay\Lib\site-packages\setuptools\dist.py", line 456, in __init__
for ep in metadata.entry_points(group='distutils.setup_keywords'):
TypeError: entry_points() got an unexpected keyword argument 'group'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

Categories