安全猴子:“ DeepDiff”版本错误

时间:2019-04-05 05:03:57

标签: security

https://github.com/Netflix/security_monkey

  

Security Monkey监视AWS,GCP,OpenStack和GitHub组织的情况   资产及其随时间的变化。

参考:https://github.com/Netflix/security_monkey/blob/v1.1.0/docs/docker.md

# Create the logging folders:
sudo mkdir /var/log/security_monkey
sudo mkdir /var/www
sudo chown -R `whoami`:www-data /var/log/security_monkey/
sudo chown www-data /var/www

# Let's install the tools we need for Security Monkey:
sudo apt-get update
sudo apt-get -y install python-pip python-dev python-psycopg2 postgresql postgresql-contrib libpq-dev nginx supervisor git libffi-dev gcc python-virtualenv redis-server

# Clone security monkey
cd /usr/local/src
sudo git clone --depth 1 --branch master https://github.com/Netflix/security_monkey.git
sudo chown -R `whoami`:www-data /usr/local/src/security_monkey
cd security_monkey
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
virtualenv venv
source venv/bin/activate
pip install --upgrade setuptools
pip install --upgrade pip
pip install --upgrade urllib3[secure]   # to prevent InsecurePlatformWarning
# pip install google-compute-engine  # Only required on GCP
# pip install cloudaux\[gcp\]
# pip install cloudaux\[openstack\]    # Only required on OpenStack
python setup.py develop

错误:

Running deepdiff-4.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QoBr8d/deepdiff-4.0.2/egg-dist-tmp-fsr78q
error: Setup script exited with Python 2 is not supported anymore. The last version of DeepDiff that supported Py2 was 3.3.0

下一步:手动更改DeepDiff

deepdiff==3.3.0中添加了requirements.txt 并做了python setup.py develop

然后说完成

Using /usr/local/src/security_monkey/venv/lib/python2.7/site-packages
Finished processing dependencies for security-monkey==1.1.1

但是,当我进行下一步时(复制静态文件之后)

cd /usr/local/src/security_monkey/
monkey db upgrade

错误

2019-04-05 01:02:27,812 DEBUG: Sentry not installed, skipping... [in /usr/local/src/security_monkey/security_monkey/__init__.py:364]
Traceback (most recent call last):
  File "/usr/local/src/security_monkey/venv/bin/monkey", line 11, in <module>
    load_entry_point('security-monkey', 'console_scripts', 'monkey')()
  File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/src/security_monkey/security_monkey/manage.py", line 31, in <module>
    from security_monkey.task_scheduler.tasks import manual_run_change_reporter, manual_run_change_finder
  File "/usr/local/src/security_monkey/security_monkey/task_scheduler/tasks.py", line 28, in <module>
    from security_monkey.task_scheduler.util import CELERY, setup
  File "/usr/local/src/security_monkey/security_monkey/task_scheduler/util.py", line 11, in <module>
    from celery import Celery
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc4-py2.7.egg/celery/__init__.py", line 150, in <module>
    from . import local  # noqa
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc4-py2.7.egg/celery/local.py", line 17, in <module>
    from .five import PY3, bytes_if_py2, items, string, string_t
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/celery-4.2.0rc4-py2.7.egg/celery/five.py", line 7, in <module>
    import vine.five
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/vine-5.0.0a1-py2.7.egg/vine/__init__.py", line 6, in <module>
    from .abstract import Thenable
  File "/usr/local/src/security_monkey/venv/lib/python2.7/site-packages/vine-5.0.0a1-py2.7.egg/vine/abstract.py", line 8
    class Thenable(Callable, metaclass=abc.ABCMeta):  # pragma: no cover
                                      ^
SyntaxError: invalid syntax

0 个答案:

没有答案