我无法psycopg2
通过ebextensions
.
00_software.config
packages:
yum:
git: []
htop: []
pip:
psycopg2: []
01_setup_pg_activity.config
commands:
clone:
command: git clone https://github.com/dalibo/pg_activity.git
install_psycopg2:
command: cd pg_activity && python setup.py install
或者,我也试过这个无济于事
commands:
clone:
command: git clone https://github.com/dalibo/pg_activity.git
install_psycopg2:
command: pip install psycopg2
install_psycopg2:
command: cd pg_activity && python setup.py install
其他软件安装,但 pip 包不会
Traceback (most recent call last):
File "/usr/local/bin/pg_activity", line 4, in <module>
__import__('pkg_resources').run_script('pg-activity==1.6.1', 'pg_activity')
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 742, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1510, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/site-packages/pg_activity-1.6.1-py2.7.egg/EGG-INFO/scripts/pg_activity", line 42, in <module>
ImportError: No module named psycopg2
我必须手动进入并运行sudo pip install psycopg2
它才能正确安装。如何在构建过程中做到这一点?