我正在遵循Django示例来创建我自己的可重用应用程序。我按照教程创建了它:Advanced tutorial: How to write reusable apps
在使用pip安装后,我发现了一些错误,所以我手动删除了目录,而不是使用pip uninstall。当我做了一些更改并想要重新安装时,我得到了一个错误:
(venv) C:\source_code\django_test>pip install --user django-polls/dist/django-polls-0.1.tar.gz
Processing c:\source_code\django_test\django-polls\dist\django-polls-0.1.tar.gz
Building wheels for collected packages: django-polls
Running setup.py bdist_wheel for django-polls ... done
Stored in directory: C:\Users\admin\AppData\Local\pip\Cache\wheels\d0\f6\b0\5993fd9396ff005d6d1f1af971ea04814e5f6b9efcc8f9ea89
Successfully built django-polls
Installing collected packages: django-polls
Found existing installation: django-polls 0.1
Not uninstalling django-polls at c:\users\admin\appdata\roaming\python\python37\site-packages, outside environment c:\source_code\django_test\venv
Can't uninstall 'django-polls'. No files were found to uninstall.
Successfully installed django-polls-0.1
(venv) C:\source_code\django_test>尽管它显示“已成功安装”,但在我的Django项目下没有创建新的目录。似乎尽管我删除了目录,Python还是在某个地方(如注册表)记录了安装,并检测到了版本冲突。
我想知道Python在哪里存储这样的信息,我如何清理注册表项,以便可以像以前从未安装过一样再次安装它?
顺便说一下,我也不能用pip卸载它:
(venv) C:\source_code\django_test>pip uninstall django-polls
Not uninstalling django-polls at c:\users\admin\appdata\roaming\python\python37\site-packages, outside environment c:\source_code\django_test\venv
Can't uninstall 'django-polls'. No files were found to uninstall.发布于 2018-12-04 14:58:40
有类似的问题。如果与--user一起安装了软件包,则该软件包位于用户的主文件夹下。只需在~/.local/lib/pythonX.X/site-packages中清理与您的包名称相关的所有内容
https://stackoverflow.com/questions/53606593
复制相似问题