简体   繁体   English

卸载django-tables2时出错

[英]error uninstalling django-tables2

Recently i installed the library django-tables2 using pip in win 10. Now when i try to uninstall using the command pip uninstall django-tables2 i get an error that's seems to be in python libraries. 最近,我在win 10中使用pip安装了django-tables2库。现在,当我尝试使用pip uninstall django-tables2命令进行pip uninstall django-tables2 ,出现了一个似乎在python库中的错误。 Here is the stack trace i'm getting: 这是我得到的堆栈跟踪:

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

Seems that somewhere in the things installed a different encoding to the an actual file encoding is assumed. 似乎在事物中某处安装的编码与实际文件编码的编码不同。

You can always remove the appropriate directory in the site-packages path shown in your error message. 您始终可以在错误消息中显示的site-packages路径中删除适当的目录。 You must delete two directories: 您必须删除两个目录:

$ 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)? 

Of course, in your case, the path will be different, more like: 当然,根据您的情况,路径会有所不同,更像是:

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\

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM