卸载 django-tables2 时出错
error uninstalling django-tables2
最近我在 win 10 中使用 pip 安装了库 django-tables2。现在,当我尝试使用命令 pip uninstall django-tables2
卸载时,我收到一个错误,似乎在 python 库中。这是我得到的堆栈跟踪:
Exception:
Traceback (most recent call last):
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\commands\uninstall.py", line 68, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_install.py", line 660, in uninstall
uninstalled_pathset = UninstallPathSet.from_dist(dist)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_uninstall.py", line 316, in from_dist
paths_to_remove.add(path)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_uninstall.py", line 169, in add
if not os.path.exists(path):
File
"c:\users\usuario\appdata\local\programs\python\python35\lib\genericpath.py",
line 19, in exists
os.stat(path)
ValueError: stat: embedded null character
似乎在某些地方安装了与实际文件编码不同的编码。
您始终可以删除错误消息中显示的站点包路径中的相应目录。您必须删除两个目录:
$ pip uninstall django-tables2
Uninstalling django-tables2-1.21.2:
Would remove:
/Users/jieter/.virtualenvs/proj/lib/python3.6/site-packages/django_tables2-1.21.2.dist-info/*
/Users/jieter/.virtualenvs/proj/lib/python3.6/site-packages/django_tables2/*
Proceed (y/n)?
当然,在你的情况下,路径会有所不同,更像是:
c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\django-tables2\
c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\django-tables2-<version>.dist-info\
最近我在 win 10 中使用 pip 安装了库 django-tables2。现在,当我尝试使用命令 pip uninstall django-tables2
卸载时,我收到一个错误,似乎在 python 库中。这是我得到的堆栈跟踪:
Exception:
Traceback (most recent call last):
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\commands\uninstall.py", line 68, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_install.py", line 660, in uninstall
uninstalled_pathset = UninstallPathSet.from_dist(dist)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_uninstall.py", line 316, in from_dist
paths_to_remove.add(path)
File "c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\pip\_internal\req\req_uninstall.py", line 169, in add
if not os.path.exists(path):
File
"c:\users\usuario\appdata\local\programs\python\python35\lib\genericpath.py",
line 19, in exists
os.stat(path)
ValueError: stat: embedded null character
似乎在某些地方安装了与实际文件编码不同的编码。
您始终可以删除错误消息中显示的站点包路径中的相应目录。您必须删除两个目录:
$ pip uninstall django-tables2
Uninstalling django-tables2-1.21.2:
Would remove:
/Users/jieter/.virtualenvs/proj/lib/python3.6/site-packages/django_tables2-1.21.2.dist-info/*
/Users/jieter/.virtualenvs/proj/lib/python3.6/site-packages/django_tables2/*
Proceed (y/n)?
当然,在你的情况下,路径会有所不同,更像是:
c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\django-tables2\
c:\users\usuario\appdata\local\programs\python\python35\lib\site-
packages\django-tables2-<version>.dist-info\