[Python]Subprocess error during installing yfinance

26 views Asked by At

I am having this error when I am installing yfinance via pip. Any solution on that?

kevin@KevindeMacBook-Air test %  pip install yfinance --upgrade --no-cache-dir
Collecting yfinance
Downloading yfinance-0.2.37-py2.py3-none-any.whl.metadata (11 kB)

Requirement already satisfied: pandas>=1.3.0 in ./venv/lib/python3.9/site-packages (from yfinance) (1.5.3)
Requirement already satisfied: numpy>=1.16.5 in ./venv/lib/python3.9/site-packages (from yfinance) (1.24.2)
Requirement already satisfied: requests>=2.31 in ./venv/lib/python3.9/site-packages (from yfinance) (2.31.0)
Collecting multitasking>=0.0.7 (from yfinance)
Downloading multitasking-0.0.11-py3-none-any.whl.metadata (5.5 kB)Collecting lxml>=4.9.1 (from yfinance)
Downloading lxml-5.1.1-cp39-cp39-macosx_10_9_x86_64.whl.metadata (3.5 kB)Collecting appdirs>=1.4.4 (from yfinance)
Downloading appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)Requirement already satisfied: pytz>=2022.5 in ./venv/lib/python3.9/site-packages (from yfinance) (2022.7.1)Collecting frozendict>=2.3.4 (from yfinance)
Downloading frozendict-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata (23 kB)Collecting peewee>=3.16.2 (from yfinance)
Downloading peewee-3.17.1.tar.gz (3.0 MB)3.0/3.0 MB 25.5 MB/s eta 0:00:00Installing 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[32 lines of output]Traceback (most recent call last):File "/Users/kevin/PycharmProjects/test/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/kevin/PycharmProjects/test/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])File "/Users/kevin/PycharmProjects/test/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 109, in <module>File "<string>", line 86, in _have_sqlite_extension_support
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/private/var/folders/6f/dx1v1ksd39732901t1pjp3dw0000gn/T/pip-build-env-yb2xybts/overlay/lib/python3.9/site-packages/setuptools/_distutils/spawn.py", line 57, in spawn
proc = subprocess.Popen(cmd, env=env)File "/usr/local/Cellar/[email protected]/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in initself._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/[email protected]/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1739, in _execute_child
env_list.append(k + b'=' + os.fsencode(v))
File "/usr/local/Cellar/[email protected]/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 810, in fsencode
filename = fspath(filename)  # Does type-checking of filename.TypeError: expected str, bytes or os.PathLike object, not int[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: 1See above for output.

yfinance version - UNABLE TO INSTALL ANY yfinance version python version: Python 3.9.1 on Mac

I can install other libraries, but not yfinance.

0

There are 0 answers