That’s a good point, and it’s what your tutorial suggests anyway.
Anyway, I tested the command again, and received the following error:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/site-packages/webencodings'
Consider using the `--user` option or check the permissions.
--- Logging error ---
Traceback (most recent call last):
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/utils/logging.py", line 177, in emit
self.console.print(renderable, overflow="ignore", crop=False, style=style)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_vendor/rich/console.py", line 1673, in print
extend(render(renderable, render_options))
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_vendor/rich/console.py", line 1305, in render
for render_output in iter_render:
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
for line in lines:
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
for segment in segments:
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_vendor/rich/console.py", line 1283, in render
renderable = rich_cast(renderable)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
renderable = cast_method()
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
pip_cmd = get_best_invocation_for_this_pip()
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
if found_executable and os.path.samefile(
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/genericpath.py", line 101, in samefile
s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/bin/pip'
Call stack:
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/bin/.pip-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 70, in main
return command.main(cmd_args)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 101, in main
return self._main(args)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
self.handle_pip_version_check(options)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 190, in handle_pip_version_check
pip_self_version_check(session, options)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/self_outdated_check.py", line 236, in pip_self_version_check
logger.warning("[present-rich] %s", upgrade_prompt)
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/logging/__init__.py", line 1458, in warning
self._log(WARNING, msg, args, **kwargs)
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/logging/__init__.py", line 1589, in _log
self.handle(record)
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/logging/__init__.py", line 1599, in handle
self.callHandlers(record)
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
hdlr.handle(record)
File "/nix/store/h4h5rxs0hzpzvz37yrwv1k2na1acgzww-python3-3.9.15/lib/python3.9/logging/__init__.py", line 952, in handle
self.emit(record)
File "/nix/store/95kl4499yaa91j0ja7vwzf5l7r3ly4b2-python3.9-pip-22.2.2/lib/python3.9/site-packages/pip/_internal/utils/logging.py", line 179, in emit
self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.2', new='23.1.2'),)
It does also suggest using the --user
parameter, so it seems it may have to do with perms.
Regardless though, it doesn’t have an effect on your tutorial but thought it would be worth mentioning.