I cannot install any python package - python

I cannot install the package in projects that were created anywhere other than the PyCharmProjects folder. I tried to create projects on the desktop both through PyCharm and without it, the result is the same just endless loading. But if you create in the PyCharmProjects folder, then no problem.
P.s in all projects had a virtual environment (venv)
Example:
pip install aiogram
ERROR: Operation cancelled by user
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\tempfile.py", line 252, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: 'c:\\users\\ali\\appdata\\local\\pip\\cache\\http\\a\\1\\9\\5\\3\\a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a4mlo_4p9.tmp'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\Scripts\pip.exe\__main__.py", line 7, in <module>
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\cli\main.py", line 70, in main
return command.main(cmd_args)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 98, in main
return self._main(args)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 214, in _main
self.handle_pip_version_check(options)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 147, in handle_pip_version_check
pip_self_version_check(session, options)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\self_outdated_check.py", line 152, in pip_self_version_check
best_candidate = finder.find_best_candidate("pip").best_candidate
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 851, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 798, in find_all_candidates
page_candidates = list(page_candidates_it)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
yield from self._candidates_from_page(self._link)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 758, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\collector.py", line 490, in fetch_page
return _get_html_page(location, session=self.session)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\collector.py", line 400, in _get_html_page
resp = _get_html_response(url, session=session)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\index\collector.py", line 115, in _get_html_response
resp = session.get(
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\network\session.py", line 454, in request
return super().request(method, url, *args, **kwargs)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 533, in send
return self.build_response(request, resp)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 79, in build_response
cached_response = self.controller.update_cached_response(
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py", line 374, in update_cached_response
self.cache.set(cache_url, self.serializer.dumps(request, cached_response))
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\network\cache.py", line 61, in set
with adjacent_tmp_file(path) as f:
File "C:\Program Files\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\Ali\Coding\Python\Zapparil\venv\lib\site-packages\pip\_internal\utils\filesystem.py", line 82, in adjacent_tmp_file
with NamedTemporaryFile(
File "C:\Program Files\Python310\lib\tempfile.py", line 549, in NamedTemporaryFile
(fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "C:\Program Files\Python310\lib\tempfile.py", line 252, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
KeyboardInterrupt

On a Windows machine, there are a lot of reasons that a pip install can fail (Windows doesn't allow some programs to access to some files). You may have to give admin permissions to the terminal you are using.

Related

running any pip commands results in an attribute error

Pip seems to have broken all of a sudden in my virtual environment (venv). When running any pip command, (like pip install --upgrade pip), I get the following error:
Traceback (most recent call last):
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
status = run_func(*args)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 339, in run
requirement_set = resolver.resolve(
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
return bool(self._sequence)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
return any(self)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 44, in _iter_built
for version, func in infos:
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 294, in iter_index_candidate_infos
result = self._finder.find_best_candidate(
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 868, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 809, in find_all_candidates
page_candidates = list(page_candidates_it)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/sources.py", line 134, in page_candidates
yield from self._candidates_from_page(self._link)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 769, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 604, in fetch_page
return _get_html_page(location, session=self.session)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 509, in _get_html_page
resp = _get_html_response(url, session=session)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 125, in _get_html_response
resp = session.get(
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_internal/network/session.py", line 454, in request
return super().request(method, url, *args, **kwargs)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/cachecontrol/adapter.py", line 57, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/requests/adapters.py", line 413, in send
conn = self.get_connection(request.url, proxies)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/requests/adapters.py", line 316, in get_connection
conn = self.poolmanager.connection_from_url(url)
File "/home/user/code/home-stuff/.venv/lib/python3.10/site-packages/pip/_vendor/urllib3/poolmanager.py", line 299, in connection_from_url
u.host_ip, port=u.port, scheme=u.scheme, pool_kwargs=pool_kwargs
AttributeError: 'Url' object has no attribute 'host_ip'
I'm running linux mint 21 with Python 3.10. Not sure what caused this issue as the only changes I've made recently were system updates (via apt upgrade).
After poking around for a bit and trying a few things, I deleted my virtual environment (rm -rf .venv) and recreated it via python -m venv .venv.

Can not use pip install on Windows 10

When I was trying to install PyQt5 on Windows 10, I got the following error:
C:\Users\USER_NAME>pip install PyQt5
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\cli\base_command.py", line 180, in _main
status = self.run(options, args)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
return func(self, options, args)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
requirement_set = resolver.resolve(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 127, in resolve
result = self._result = resolver.resolve(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 473, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _merge_into_criterion
if not criterion.candidates:
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 139, in __bool__
return bool(self._sequence)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in __bool__
return any(self)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 129, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 30, in _iter_built
for version, func in infos:
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 269, in iter_index_candidate_infos
result = self._finder.find_best_candidate(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\package_finder.py", line 879, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\package_finder.py", line 824, in find_all_candidates
page_candidates = list(page_candidates_it)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
yield from self._candidates_from_page(self._link)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\package_finder.py", line 783, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\collector.py", line 512, in fetch_page
return _get_html_page(location, session=self.session)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\collector.py", line 422, in _get_html_page
resp = _get_html_response(url, session=session)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\index\collector.py", line 120, in _get_html_response
resp = session.get(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\network\session.py", line 449, in request
return super().request(method, url, *args, **kwargs)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\connection.py", line 500, in _connect_tls_proxy
return ssl_wrap_socket(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "c:\users\andrew\appdata\local\programs\python\python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "c:\users\andrew\appdata\local\programs\python\python39\lib\ssl.py", line 997, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
I have tried all the methods on this link and none of them helps. What could be the problem here? I have spent a lot of time on this. Thank you so much!!!
I don't have a proxy server on my system, does it matter? It might not be the problem of PyQt5. It might be the problem of my system.
I would try downloading anaconda, it has the pyQt5 environment, also when downloading / installing, make sure you click the update path option.
Go through these below, but it'd also be helpful if you could verify that you have pip installed correctly with pip -V.
https://www.geeksforgeeks.org/how-to-install-pip-on-windows/
https://stackoverflow.com/a/44232032/12406158

Why "pipenv install requests" command on windows powershell is showing error? [duplicate]

This question already has answers here:
pipenv Failing to Install Packages
(3 answers)
Closed 1 year ago.
I have already installed python's latest version and pipenv on Windows Powershell. When I try to install requests it is showing this error:
FileNotFoundError: [WinError 2] The system cannot find the file specified
ValueError: Not a valid python path: 'C:/ProgramData/Anaconda3/python.exe'
Full error code:
Traceback (most recent call last):
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 618, in parse_executable
result_version = get_python_version(path)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\utils.py", line 105, in get_python_version
c = subprocess.Popen(version_cmd, **subprocess_kwargs)
File "c:\python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\python39\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
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Python39\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\python39\lib\site-packages\pipenv\cli\command.py", line 233, in install
retcode = do_install(
File "c:\python39\lib\site-packages\pipenv\core.py", line 1920, in do_install
ensure_project(
File "c:\python39\lib\site-packages\pipenv\core.py", line 576, in ensure_project
ensure_virtualenv(
File "c:\python39\lib\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
python = ensure_python(three=three, python=python)
File "c:\python39\lib\site-packages\pipenv\core.py", line 388, in ensure_python
path_to_python = find_a_system_python(python)
File "c:\python39\lib\site-packages\pipenv\core.py", line 350, in find_a_system_python
return next(iter(finder.find_all_python_versions()), None)
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 312, in find_all_python_versions
python_version_dict = getattr(self.system_path, "python_version_dict", {})
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 120, in system_path
self._system_path = self.create_system_path()
File "c:\python39\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 82, in create_system_path
return pyfinder_path.SystemPath.create(
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 682, in create
instance = instance._run_setup()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 233, in _run_setup
new_instance = new_instance._setup_windows()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 411, in _setup_windows
windows_finder = WindowsFinder.create()
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 146, in create
return cls()
File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 113, in get_versions
versions[py_version.version_tuple[:5]] = base_dir
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 365, in __getattribute__
result = super(PythonVersion, self).__getattribute__(key)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 430, in version_tuple
self.patch,
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 375, in __getattribute__
instance_dict = self.parse_executable(executable)
File "C:\Python39\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 620, in parse_executable
raise ValueError("Not a valid python path: %r" % path)
ValueError: Not a valid python path: 'C:/ProgramData/Anaconda3/python.exe'
It seems like you have two different Python distributions installed on your system: the Python 3.9 in C:\Python39\ and the Anaconda Python in C:/ProgramData/Anaconda3/. There is a conflict between them.
I recommend that you use one of them only - the Anaconda or the official Python, and uninstall another.

I'm trying to install Google Assistant but encounter an error that I can't find a solution anywhere

I'm trying to install Google Assistant but I encountered an error like this:
Someone please help me fix this
I followed the instruction in this video https://www.youtube.com/watch?v=yfVMXq6mEXk&t=623s
Press Enter to send a new request...
INFO:root:Recording audio request.
INFO:root:Transcript of user request: "hello".
INFO:root:Transcript of user request: "help".
INFO:root:Transcript of user request: "hello".
INFO:root:Transcript of user request: "hello".
INFO:root:End of audio request detected.
INFO:root:Stopping recording.
INFO:root:Transcript of user request: "hello".
INFO:root:Playing assistant response.
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python39\lib\site-packages\googlesamples\assistant\grpc\pushtotalk.py", line 469, in <module>
main()
File "C:\Program Files\Python39\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Program Files\Python39\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Program Files\Python39\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\googlesamples\assistant\grpc\pushtotalk.py", line 458, in main
continue_conversation = assistant.assist()
File "C:\Program Files\Python39\lib\site-packages\tenacity\__init__.py", line 241, in wrapped_f
return self.call(f, *args, **kw)
File "C:\Program Files\Python39\lib\site-packages\tenacity\__init__.py", line 329, in call
do = self.iter(result=result, exc_info=exc_info,
File "C:\Program Files\Python39\lib\site-packages\tenacity\__init__.py", line 279, in iter
return fut.result()
File "C:\Program Files\Python39\lib\concurrent\futures\_base.py", line 433, in result
return self.__get_result()
File "C:\Program Files\Python39\lib\concurrent\futures\_base.py", line 389, in __get_result
raise self._exception
File "C:\Program Files\Python39\lib\site-packages\tenacity\__init__.py", line 333, in call
result = fn(*args, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\googlesamples\assistant\grpc\pushtotalk.py", line 154, in assist
self.conversation_stream.write(resp.audio_out.audio_data)
File "C:\Program Files\Python39\lib\site-packages\googlesamples\assistant\grpc\audio_helpers.py", line 326, in write
buf = normalize_audio_buffer(buf, self.volume_percentage)
File "C:\Program Files\Python39\lib\site-packages\googlesamples\assistant\grpc\audio_helpers.py", line 57, in normalize_audio_buffer
buf = arr.tostring()
AttributeError: 'array.array' object has no attribute 'tostring'```

PIP fails installing pylint

I have been using spyder for last three years, and just moved on to Visual Studio Code.
VSC is recommending me to install pylint, but my cmd outputs this.
C:\WINDOWS\system32>pip install pylint
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in _main
status = self.run(options, args)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\cli\req_command.py", line 185, in wrapper
return func(self, options, args)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 332, in run
requirement_set = resolver.resolve(
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 313, in _get_abstract_dist_for
self._populate_link(req)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 279, in _populate_link
req.link = self.finder.find_requirement(req, upgrade)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\package_finder.py", line 900, in find_requirement
best_candidate_result = self.find_best_candidate(
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\package_finder.py", line 883, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\package_finder.py", line 827, in find_all_candidates
package_links = self.process_project_url(
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\package_finder.py", line 792, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\collector.py", line 612, in fetch_page
return _get_html_page(location, session=self.session)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\collector.py", line 451, in _get_html_page
resp = _get_html_response(url, session=session)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\index\collector.py", line 149, in _get_html_response
resp = session.get(
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\network\session.py", line 421, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 520, in request
settings = self.merge_environment_settings(
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 697, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\utils.py", line 766, in get_environ_proxies
if should_bypass_proxies(url, no_proxy=no_proxy):
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\utils.py", line 750, in should_bypass_proxies
bypass = proxy_bypass(parsed.hostname)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\utils.py", line 96, in proxy_bypass
return proxy_bypass_registry(host)
File "c:\users\newsk\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\requests\utils.py", line 61, in proxy_bypass_registry
proxyEnable = int(winreg.QueryValueEx(internetSettings,
ValueError: invalid literal for int() with base 10: b'\x00\x00\x00\x00'
I had a similar message last time when I tried to install tensorflow using pip.
Can anybody help me with this issue?
Thanks.

Categories

Resources