1

执行“pip install dj-database-url”会出现以下错误:

Downloading/unpacking dj-database-url Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 942, in prepare_files
    location = req_to_install.build_location(self.build_dir, not self.is_download)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 144, in build_location
    _make_build_dir(build_dir)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1185, in
_make_build_dir
    os.makedirs(build_dir)   File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode) OSError: [Errno 13] Permission denied: '/vagrant/django_projects/microblog/build'

Storing complete log in /var/lib/postgresql/.pip/pip.log

我不知道我做错了什么。请帮忙。

4

2 回答 2

3
  1. 设置 virtualenv 并启动它。

  2. pip install Django psycopg2 南 dj-database-url

于 2013-02-10T07:26:39.577 回答
1

使用virtualenv或运行您的命令sudo

于 2013-02-10T05:54:14.903 回答