Dependency issues with setup.py (redis)
sidewinder31 opened this issue · 6 comments
~$ monkey db upgrade
Traceback (most recent call last):
File "/usr/local/src/security_monkey/venv/bin/monkey", line 6, in
from pkg_resources import load_entry_point
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2927, in
@_call_aside
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 637, in _build_master
return cls._build_from_requirements(requires)
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 650, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/src/security_monkey/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 834, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (redis 3.2.1 (/usr/local/src/security_monkey/venv/lib/python2.7/site-packages), Requirement.parse('redis<3,>=2.10.5'), set(['celery']))
Description of issue:
Seems to be a dependency issue with redis.
~$ python setup.py develop -- By default installs redis 3.2.1.
When running monkey it throws the above error.
Tried switching to redis 2.10.5 after installation but pip says security-monkey requires redis 3.2.1.
Strange...
Trying on an EC2 instance. Ubuntu 16.04 amd64-server
Are you running off of the latest develop
branch? I pushed an update last week that should resolve this.
You'll need to re-run pip install -r requirements.txt
from within the venv
.
Yes, git cloned from the develop branch:
sudo git clone --branch develop https://github.com/Netflix/security_monkey.git
Created venv and then ran the following:
pip install --upgrade setuptools
pip install --upgrade pip
pip install --upgrade urllib3[secure]
pip install -r requirements.txt
Output from running python setup.py develop
:
:/usr/local/src/security_monkey$ python setup.py develop
running develop
running egg_info
creating security_monkey.egg-info
writing requirements to security_monkey.egg-info/requires.txt
writing security_monkey.egg-info/PKG-INFO
writing top-level names to security_monkey.egg-info/top_level.txt
writing dependency_links to security_monkey.egg-info/dependency_links.txt
writing entry points to security_monkey.egg-info/entry_points.txt
writing manifest file 'security_monkey.egg-info/SOURCES.txt'
reading manifest file 'security_monkey.egg-info/SOURCES.txt'
writing manifest file 'security_monkey.egg-info/SOURCES.txt'
running build_ext
Creating /usr/local/src/security_monkey/venv/lib/python2.7/site-packages/security-monkey.egg-link (link to .)
Adding security-monkey 1.1.1 to easy-install.pth file
Installing monkey script to /usr/local/src/security_monkey/venv/binInstalled /usr/local/src/security_monkey
Processing dependencies for security-monkey==1.1.1
error: redis 3.2.1 is installed but redis<3,>=2.10.5; extra == "redis" is required by set(['celery'])
Good news -- I am able to replicate locally! So I will work on a fix.
@sidewinder31 : After I merge in #1192 , please pull down the latest develop, wipe out your venv
, re--create it re-run the pip commands here: https://github.com/Netflix/security_monkey/blob/develop/docs/installation/03-install-sm.md#clone-security_monkey
This appears to have fixed my issue locally.
Yep, now works fine!
Glad to hear it! Thank you for reporting this!