我昨天尝试安装 virtualenvwrapper。安装过程的一部分要求我使用
安装 virtualenvwrappersudo pip install ...
不管系统给出的警告。这是根据安装文档。
现在,我根本打不开Firefox。它只是拒绝启动。我已经卸载它并重新安装了两次。重启无数次,还是不行。尝试通过终端删除 virtualenvwrapper 时,出现以下错误:
enzosnyman@Enzos-MacBook-Pro ~ % pip uninstall virtualenvwrapper
WARNING: The directory '/Users/enzosnyman/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Found existing installation: virtualenvwrapper 4.8.4
Uninstalling virtualenvwrapper-4.8.4:
Would remove:
/Library/Frameworks/Python.framework/Versions/3.11/bin/virtualenvwrapper.sh
/Library/Frameworks/Python.framework/Versions/3.11/bin/virtualenvwrapper_lazy.sh
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper-4.8.4-py3.11-nspkg.pth
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper-4.8.4-py3.11.egg-info
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper/hook_loader.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper/project.py
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper/user_scripts.py
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 825, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper-4.8.4-py3.11.egg-info' -> '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/~irtualenvwrapper-4.8.4-py3.11.egg-info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/commands/uninstall.py", line 105, in run
uninstall_pathset = req.uninstall(
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 664, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 373, in remove
moved.stash(path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 271, in stash
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 312, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 838, in move
raise PermissionError("Cannot move the non-empty directory "
PermissionError: Cannot move the non-empty directory '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper-4.8.4-py3.11.egg-info': Lacking write permission to '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/virtualenvwrapper-4.8.4-py3.11.egg-info'.