Не удалось удалить виртуальный pip, чтобы я мог использовать pipenv

когда я бегу sudo pip virtualЯ получаю это сообщение об ошибке:

      Found existing installation: virtualenv 20.0.17
Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'virtualenv'. No files were found to uninstall.

Когда я бегу pipenv shellпосле установки pipenv я получаю эту ошибку:

      Creating a virtualenv for this project…
Using /usr/bin/python3 (3.8.10) to create virtualenv…
⠋ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
Error while trying to remove the /home/moringa/.local/share/virtualenvs/moringa-fnkCNhQl env: 
No such file or directory

Virtualenv location: 
Creating a Pipfile for this project…
Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 571, in shell
    core.do_shell(
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 2093, in do_shell
    ensure_project(three=three, python=python, validate=False)
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 636, in ensure_project
    ensure_pipfile(validate=validate, skip_requirements=skip_requirements)
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 289, in ensure_pipfile
    project.create_pipfile(python=python)
  File "/usr/lib/python3/dist-packages/pipenv/project.py", line 518, in create_pipfile
    'python_version': python_version(required_python)[: len('2.7')]
TypeError: 'NoneType' object is not subscriptable

Как я могу переключиться с virtualenv на использование pipenv?

0 ответов

Другие вопросы по тегам