I am trying to run pip install prophet as I am trying to make a prophet forecast on a set of data that I have ready. However, when running the command in the terminal it seems to give me an error from the point of where it says Installing dependecies...
C:\Users\jongy\Documents\GitHub\COVID-19-Research>pip install prophet
Collecting prophet
Using cached prophet-1.1.2.tar.gz (67 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [69 lines of output]
Collecting setuptools>=64
Using cached setuptools-67.1.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cmdstanpy>=1.0.4
Using cached cmdstanpy-1.1.0-py3-none-any.whl (83 kB)
Collecting numpy>=1.21
Using cached numpy-1.24.1.tar.gz (10.9 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[40 lines of output]
Traceback (most recent call last):
File "C:\msys64\mingw64\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\msys64\mingw64\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\msys64\mingw64\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
File "C:\msys64\mingw64\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
File "C:\msys64\mingw64\lib\python3.10\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 887, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\jongy\AppData\Local\Temp\pip-build-env-rcrx6svy\overlay\lib\python3.10\site-packages\setuptools\__init__.py", line 242, in <module>
monkey.patch_all()
File "C:\Users\jongy\AppData\Local\Temp\pip-build-env-rcrx6svy\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\jongy\AppData\Local\Temp\pip-build-env-rcrx6svy\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:\Users\jongy\AppData\Local\Temp\pip-build-env-rcrx6svy\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\msys64\mingw64\lib\python3.10\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 887, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\jongy\AppData\Local\Temp\pip-build-env-rcrx6svy\overlay\lib\python3.10\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
[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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
After looking through the error I thought that maybe my python version was the issue and tried using Python 3.10 instead of 3.11. However, the error consistently popped up.
I am also aware that fbprophet exists but as I am using a windows computer I cannot use fbprophet. As well as, after checking the facebook prophet documentation it said to run python -m pip install prophet which I did but the program still gave me the same error.
Can someone tell me the reason behind this issue so that I can solve it?
Many thanks,
John
Related
I tried several ways to install gradio. But it gives this error every time. I can't install it. What could be the solution?
C:\Users\ugurn>pip install gradio
Collecting gradio
Using cached gradio-3.15.0-py3-none-any.whl (13.8 MB)
Collecting python-multipart
Using cached python-multipart-0.0.5.tar.gz (32 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [34 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\ugurn\AppData\Local\Temp\pip-install-z61k1lxd\python-multipart_8b04b9f47ece46d0a012ed3b3c3183cb\setup.py", line 19, in <module>
setup(name='python-multipart',
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\_distutils\core.py", line 147, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\dist.py", line 475, in __init__
_Distribution.__init__(
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\_distutils\dist.py", line 283, in __init__
self.finalize_options()
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\dist.py", line 898, in finalize_options
for ep in sorted(loaded, key=by_order):
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\dist.py", line 897, in <lambda>
loaded = map(lambda e: e.load(), filtered)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\importlib\metadata\__init__.py", line 171, in load
module = import_module(match.group('module'))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\py2app\build_app.py", line 37, in <module>
from py2app.create_appbundle import create_appbundle
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\py2app\create_appbundle.py", line 9, in <module>
from py2app.util import make_exec, makedirs, mergecopy, mergetree, skipscm
File "C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\py2app\util.py", line 5, in <module>
import fcntl
ModuleNotFoundError: No module named 'fcntl'
[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 want to install Gradio without any problem
The problem is not related to gradio. You have installed py2app on your Windows but https://pypi.org/project/py2app/ is only for Mac OS X. Uninstall py2app:
pip uninstall -y py2app
or remove the directory C:\Users\ugurn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\py2app
https://github.com/Miker2808/PyRoboteq
I am trying to use this github package for motor control of a robot. I have been unable to get it to work in vscode, and have tried a few different ways of installing the package. I thought there was something wrong with the package, but I tried to use the same way to install a known package like flask, yet I still get the error below when trying to install the package.
I tried pip3 install (package), that ran correctly and it showed up when I ran pip freeze, but I was unable to import the package in my code.
Here is the error i got when trying to install flask:
sudo pip3 install -e git+https://github.com/pallets/flask#egg=flask
Obtaining flask from git+https://github.com/pallets/flask#egg=flask
Cloning https://github.com/pallets/flask to ./src/flask
Running command git clone -q https://github.com/pallets/flask /home/chase/src/flask
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chase/src/flask/setup.py'"'"'; __file__='"'"'/home/chase/src/flask/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
cwd: /home/chase/src/flask/
Complete output (35 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/chase/src/flask/setup.py", line 4, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 701, in parse_config_files
parse_configuration(self, self.command_options,
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 121, in parse_configuration
meta.parse()
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 426, in parse
section_parser_method(section_options)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 399, in parse_section
self[name] = value
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 184, in __setitem__
value = parser(value)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 515, in _parse_version
version = self._parse_attr(value, self.package_dir)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 349, in _parse_attr
module = import_module(module_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/chase/src/flask/src/flask/__init__.py", line 4, in <module>
from . import json as json
File "/home/user/src/flask/src/flask/json/__init__.py", line 6, in <module>
from jinja2.utils import htmlsafe_json_dumps as _jinja_htmlsafe_dumps
ModuleNotFoundError: No module named 'jinja2'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Do I have to change something in vscode so it can access the packages I installed?
I tried multiple weays of installing package, unable to use the package anyway.
I'm trying to install pycuda with pip install pycuda in virtual environment. I installed python3.10-distutils, but the error remains. My system Ubuntu22.04, python3.10. I also have tried manual installation with instructions from https://wiki.tiker.net/PyCuda/Installation/Linux/. It also failed with ModuleNotFoundError: No module named 'setuptools.command.build_ext'.
Any suggestions?
Collecting pycuda
Using cached pycuda-2022.1.tar.gz (1.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pytools>=2011.2
Using cached pytools-2022.1.12.tar.gz (70 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-s4dqljda/pytools_9b2a0e1beabb402e9d87af0960b817ca/setup.py", line 14, in <module>
setup(name="pytools",
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 172, in setup
ok = dist.parse_command_line()
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 474, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/dist.py", line 1107, in _parse_command_opts
nargs = _Distribution._parse_command_opts(self, parser, args)
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 533, in _parse_command_opts
cmd_class = self.get_command_class(command)
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/dist.py", line 954, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 24, in <module>
from setuptools.command.sdist import sdist
File "/home/konstantin/Yandex.Disk/code/env/lib/python3.10/site-packages/setuptools/command/sdist.py", line 2, in <module>
import distutils.command.sdist as orig
ModuleNotFoundError: No module named 'distutils.command.sdist'
[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 running a python script which uses matplotlib. I got following error:
Traceback (most recent call last):
File "q3.py", line 6, in <module>
matplotlib.use('TkAgg')
File "/home/raj/raj/venvs/notes-bash-venv/lib/python3.8/site-packages/matplotlib/__init__.py", line 1162, in use
plt.switch_backend(name)
File "/home/raj/raj/venvs/notes-bash-venv/lib/python3.8/site-packages/matplotlib/pyplot.py", line 276, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/home/raj/raj/venvs/notes-bash-venv/lib/python3.8/site-packages/matplotlib/pyplot.py", line 277, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/raj/raj/venvs/notes-bash-venv/lib/python3.8/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/raj/raj/venvs/notes-bash-venv/lib/python3.8/site-packages/matplotlib/backends/_backend_tk.py", line 6, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
So I tried installing tkinter:
$ pip3 install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
What cound be wrong? For the same script, I installed numpy, pandas and matplotlib using command like pip3 install numpy. I am on python 3.8.2 and pip-20.2.3. Also I am on Ubuntu 20.04 on WSL2.
Did you try to install dependencies for Tkinter systemwide?:
sudo apt-get install python3-tk
You may resolve it by using this command OS-wide:
sudo apt install python3-tk
Check it out and let me know if it works.
I am trying to install the following dependencies:
appdirs==1.4.3
click==6.7
Flask==1.0
itsdangerous==0.24
Jinja2==2.10.1
MarkupSafe==1.0
packaging==16.8
prometheus-client==0.0.19
pyparsing==2.2.0
Werkzeug==0.15.3
But no matter which dependency I try to install I get the following error:
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==19.3', 'console_scripts', 'pip')()
File "/usr/lib/python3.8/site-packages/pip/_internal/main.py", line 45, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 28, in <module>
from pip._internal.self_outdated_check import (
File "/usr/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 15, in <module>
from pip._vendor.six import ensure_binary
ImportError: cannot import name 'ensure_binary' from 'six' (/usr/lib/python3.8/site-packages/six.py)
What is the issue?
Posting this answer here specifically for people that use Manjaro Linux (where the use of pip is not recommended as it can break one's environment if not used correctly). It can also result in subsequent distro updates to not happen seamlessly and may result in manual intervention required.
The solution to undo the damage to the environment is to use:
sudo pacman -Syu python-pkgname --overwrite='*'
where pkgname is the name of the python dependency you want to install. After this is done, the environment should be fixed and subsequently it will not be required to apply the --overwrite option.
This whole Python 2 and Python 3 and the resulting pip2 and pip3 tools separation is insane.