令牌0644文件权限Django无效

时间:2016-08-29 15:40:48

标签: python django github

我想让这个Django项目在本地运行https://github.com/vitorfs/bootcamp

我正在按照安装指南进行操作 https://github.com/vitorfs/bootcamp/wiki/Installing-and-Running-Bootcamp

但是当我尝试迁移时,我收到此错误

$ pip install psycopg2
Collecting psycopg2
  Using cached psycopg2-2.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    Error: pg_config executable not found.

    Please add the directory containing pg_config to the PATH
    or specify the full executable path with the option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8l/nwwcj_1d2k5_wf3td439ftfh0000gn/T/pip-build-w76_ywwu/psycopg2/

所以我试图删除psycopg2并迁移它,然后我收到FILE PERMISSION 0644无效令牌。我这样做尝试使用pip安装psycopg2。

我正在使用虚拟环境。

1 个答案:

答案 0 :(得分:1)

如果您使用的是Python 3,则应提供八进制格式的令牌。在您的Django settings.py中,更改为:FILE_UPLOAD_PERMISSIONS = 0o644