在这里发布问答,因为目前还没有关于此类错误的帖子,网络搜索上的其他链接导致 Unresolved gihub 问题。这是我刚刚在我的虚拟 python 环境中更新一个包:
(py36) $ pip install tornado -U
Collecting tornado
Downloading https://files.pythonhosted.org/packages/03/3f/5f89d99fca3c0100c8cede4f53f660b126d39e0d6a1e943e95cc3ed386fb/tornado-6.0.2.tar.gz (481kB)
100% |████████████████████████████████| 491kB 476kB/s
Building wheels for collected packages: tornado
Building wheel for tornado (setup.py) ... done
Stored in directory: /home/nikhil/.cache/pip/wheels/61/7e/7a/5e02e60dc329aef32ecf70e0425319ee7e2198c3a7cf98b4a2
Successfully built tornado
Installing collected packages: tornado
Found existing installation: tornado 5.1.1
Uninstalling tornado-5.1.1:
Successfully uninstalled tornado-5.1.1
Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/mnt/STUFF/py36/lib/python3.6/site-packages/~ornado'
那么如何解决这个问题呢?
请您参考如下方法:
检查错误消息中突出显示的实际文件夹:
/mnt/STUFF/py36/lib/python3.6/site-packages/~ornado
我发现那里还有另一个 .fuse-hidden... 文件,通常是在运行时我在我的文件夹中使用 Geany(文本编辑器)时,它然后在我保存文件并刷新文件夹后消失。不知何故,这样的文件也在这里创建并且从未被删除。请注意,这可能是我的操作系统的错误,而不是 Geany 的 - IDK。无论如何,我自己删除了文件并运行了升级命令,这次没有出现错误。
