我在安装psycopg2时遇到问题.我尝试以下时出现以下错误pip install psycopg2:
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 /tmp/pip-build/psycopg2
Run Code Online (Sandbox Code Playgroud)
但问题pg_config实际上是在我的PATH; 它运行没有任何问题:
$ which pg_config
/usr/pgsql-9.1/bin/pg_config
Run Code Online (Sandbox Code Playgroud)
我尝试将pg_config路径添加到该setup.cfg文件并使用我从其网站(http://initd.org/psycopg/)下载的源文件构建它,我收到以下错误消息!
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
Run Code Online (Sandbox Code Playgroud)
但实际上它就是!!!
我对这些错误感到困惑.有人可以帮忙吗?
顺便说一句,我 …
我知道pip是python包的包管理器.但是,我看到IPython网站conda上的安装用于安装IPython.
我可以pip用来安装IPython吗?conda我已经拥有了为什么要用作另一个python包管理器pip?
pip和之间有什么区别conda?
使用pip,是否可以确定当前安装的软件包版本?
我知道,pip install XYZ --upgrade但我想知道是否有类似的东西pip info XYZ.如果不是什么是告诉我目前使用的版本的最佳方式.
尝试pip安装repo的特定分支.谷歌告诉我
pip install git + https://github.com/user/repo.git@branch
这个分支的名字是issue/34/oscar-0.6我做的,pip install https://github.com/tangentlabs/django-oscar-paypal.git@/issue/34/oscar-0.6但它返回404.
我该如何安装这个分支?
我正在尝试修复我的一个virtualenvs - 我想将所有已安装的库重置为与生产相匹配的库.
使用pip有一种快速简便的方法吗?
我想安装pip.它应该支持Python 3,但它需要setuptools,它只适用于Python 2.
如何用Python 3安装pip?
我正在尝试使用pip来安装TensorFlow:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?到目前为止,我已经使用了Python和pip而没有任何问题.
我能够更新pip托管包,但是如何更新pip本身?根据pip --version,我目前在我的virtualenv中安装了pip 1.1,我想更新到最新版本.
命令是什么?我是否需要使用分发或是否有本机pip或virtualenv命令?我已经尝试过pip update,并pip update pip没有成功.
我正在使用virtualenv,我需要安装"psycopg2".
我做了以下事情:
pip install http://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda814160
Run Code Online (Sandbox Code Playgroud)
我有以下消息:
Downloading/unpacking http://pypi.python.org/packages/source/p/psycopg2/psycopg2
-2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda814160
Downloading psycopg2-2.4.tar.gz (607Kb): 607Kb downloaded
Running setup.py egg_info for package from http://pypi.python.org/packages/sou
rce/p/psycopg2/psycopg2-2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda814160
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'.
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 …Run Code Online (Sandbox Code Playgroud) 我遇到过当前版本的软件包似乎无法运行并需要重新安装的情况.但是pip install -U不会触及已经是最新的包装.我看到如何通过首先卸载(with pip uninstall)然后安装来强制重新安装,但有没有办法简单地在一步中强制"更新"到名义上的当前版本?
pip ×10
python ×10
psycopg2 ×2
virtualenv ×2
conda ×1
git ×1
ipython ×1
package ×1
packages ×1
python-3.x ×1
setuptools ×1
tensorflow ×1
upgrade ×1