VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 2
声望: 0

在用python安装vnpy时出现如下报错,导致后面运行run.py也无法打开station,该如何解决?

_Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-74svu0iu/psycopg2/

_
Generating locales (this might take a while)...
zh_CN.GB18030... done
Generation complete.
Processing /home/jck/下载/vnpy-2.0.2
Collecting PyQt5<5.12 (from vnpy==2.0.1)
Using cached https://files.pythonhosted.org/packages/d4/bf/d884da8e2f7096d201c891d515eb6813a8e85df5eb6f5e12e867bf1d831c/PyQt5-5.11.3-5.11.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Collecting qdarkstyle (from vnpy==2.0.1)
Using cached https://files.pythonhosted.org/packages/93/3b/db1b53352f05dc1d5acacd3a8ebee5e4c76fffff02a9f908bc2c463962e3/QDarkStyle-2.6.6-py2.py3-none-any.whl
Requirement already satisfied: requests in /home/jck/anaconda3/lib/python3.7/site-packages (from vnpy==2.0.1) (2.21.0)
Collecting websocket-client (from vnpy==2.0.1)
Using cached https://files.pythonhosted.org/packages/29/19/44753eab1fdb50770ac69605527e8859468f3c0fd7dc5a76dd9c4dbd7906/websocket_client-0.56.0-py2.py3-none-any.whl
Collecting peewee (from vnpy==2.0.1)
Using cached https://files.pythonhosted.org/packages/95/4f/97404f265299f3e6584efa3890bd325802b4076ea75e184c46c3c6c8c7ba/peewee-3.9.4.tar.gz
Requirement already satisfied: pymysql in /home/jck/anaconda3/lib/python3.7/site-packages (from vnpy==2.0.1) (0.9.3)
Collecting psycopg2 (from vnpy==2.0.1)
Using cached https://files.pythonhosted.org/packages/23/7e/93c325482c328619870b6cd09370f6dbe1148283daca65115cd63642e60f/psycopg2-2.8.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 dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  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'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-k4lmqlj5/psycopg2/

Administrator
avatar
加入于:
帖子: 4500
声望: 320

pip install psycopg2-binary

试试这个

Administrator
avatar
加入于:
帖子: 4500
声望: 320

pip install psycopg2-binary

试试这个

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】