相关疑难解决方法(0)

pip install -r:OSError:[Errno 13]权限被拒绝

我正在尝试设置Django.

当我运行时pip install -r requirements.txt,我得到以下异常:

Installing collected packages: amqp, anyjson, arrow, beautifulsoup4, billiard, boto, braintree, celery, cffi, cryptography, Django, django-bower, django-braces, django-celery, django-crispy-forms, django-debug-toolbar, django-disqus, django-embed-video, django-filter, django-merchant, django-pagination, django-payments, django-storages, django-vote, django-wysiwyg-redactor, easy-thumbnails, enum34, gnureadline, idna, ipaddress, ipython, kombu, mock, names, ndg-httpsclient, Pillow, pyasn1, pycparser, pycrypto, PyJWT, pyOpenSSL, python-dateutil, pytz, requests, six, sqlparse, stripe, suds-jurko
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", …
Run Code Online (Sandbox Code Playgroud)

python permissions install pip

113
推荐指数
5
解决办法
18万
查看次数

Docker-Compose 使用 postgresql 构建失败 [权限被拒绝],除非它使用缓存的 Dockerfile

感谢您花时间阅读这篇文章!

我目前正在 Ubuntu 18.04 LTS 上构建一个使用 Python、Flask、Docker、Docker-compose 和 Postgres 的应用程序。以前,docker-compose 构建会成功,一切都按计划进行。但是,现在我切换到另一个 Dockerfile,并且不再使用先前 Dockerfile 的缓存版本,构建会中断并出现以下错误:

PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.7/__pycache__/__future__.cpython-37.pyc.140409285875056'
dpkg: error processing package python3.7-minimal (--configure):
 installed python3.7-minimal package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3.7-minimal
Run Code Online (Sandbox Code Playgroud)

我尝试过以下(Stackoverflow)帖子:

但可惜,无济于事。

我正在使用以下文件:

Dockerfile.prod

# pull official base image
FROM python:3.9.0-slim-buster

# set working …
Run Code Online (Sandbox Code Playgroud)

postgresql python-3.x docker docker-compose python-3.7

5
推荐指数
1
解决办法
1306
查看次数