1

我在 python 项目中使用虚拟环境。我可以轻松地在其中安装 Django。最初,当我输入“pip freeze”命令时,结果如下 -

Django==1.8
wheel==0.24.0

现在,当我使用 pip 安装 django-allauth 时,这些错误就会抛出 -

  File "/home/user/project/env/local/lib/python2.7/site-packages/pip/req/req_install.py", line 256, in link
self._link = self._wheel_cache.cached_wheel(link, self.name)
  File "/home/user/project/env/local/lib/python2.7/site-packages/pip/wheel.py", line 63, in cached_wheel
self._cache_dir, link, self._format_control, package_name)
  File "/home/user/project/env/local/lib/python2.7/site-packages/pip/wheel.py", line 124, in cached_wheel
wheel_names = os.listdir(root)
 OSError: [Errno 13] Permission denied: '/home/user/.cache/pip/wheels/8e/2c/02/5f7eb1a476cd75481801f52a0770262ed00573f48d830a4713'

我想这与我创建虚拟环境时预装的 Wheels 包有关,但我不知道如何解决它。

4

1 回答 1

1

I guess your wheel configuration is messed up and tries to write wheels into a directory you don't have access to. It might be the case that the django and wheel packages are already present in this directory, but allauth isn't.

You should probably try the --no-use-wheel option on pip install.

于 2015-06-23T15:01:59.447 回答