尝试在python virtualenv中安装django-toolkit时出错 [英] Error when attempting to install django-toolkit within a python virtualenv
问题描述
我对Python来说相对较新,对Django和Heroku来说是非常陌生的,并且在终端上工作也很新.
I'm relatively new to Python, extremely new to Django and Heroku, and also rather new to working in the terminal.
我正尝试遵循有关设置的Django Heroku项目的说明.这里.我被以下命令卡住了:
I'm attempting to follow the instructions on setting up a Django Heroku project found here. I'm getting stuck at the following command:
pip install django-toolbelt
我一直收到以下错误:
Error: pg_config executable not found.
我不知道这是否与问题有很远的联系,但这是我到目前为止已经尝试过的事情:
I don't know if any of this is even remotely related to the problem, but these are the things I've tried so far:
- 尝试重新安装django-toolbelt(只需再次运行命令)
- 尝试从Postgres.app切换到完整的Mac OSX安装
没有运气.我想念什么?
No luck. What am I missing?
根据Midimo的建议,我尝试安装python-dev.这就是发生的事情:
Per Midimo's suggestion, I tried installing python-dev. This is what happened:
(venv)Macbook:[SITE] [USER]$ pip install python-dev
Downloading/unpacking python-dev
Could not find any downloads that satisfy the requirement python-dev
Cleaning up...
No distributions at all found for python-dev
Storing complete log in /Users/[USER]/.pip/pip.log
这就是我尝试安装libpq-dev ...
EDIT 2: And this is what happened when I tried to install libpq-dev...
(venv)Macbook:[SITE] [USER]$ pip install libpq-dev
Downloading/unpacking libpq-dev
Could not find any downloads that satisfy the requirement libpq-dev
Cleaning up...
No distributions at all found for libpq-dev
Storing complete log in /Users/[USER]/.pip/pip.log
推荐答案
您是否已安装 python-dev
?如果这样做,请尝试安装 libpq-dev
do you have python-dev
installed?
If you did, try installing libpq-dev
这篇关于尝试在python virtualenv中安装django-toolkit时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!