Open bbartling opened 1 year ago
Hi Ben, this looks like a cryptography depdency issue which recently got resolved in a PR I submitted to openleadr that got merged last month. I recommend installing the latest from openleadr, 0.5.27 which should have the fix. Once you have that version of openleadr, you should be able to install the agent without running into this error.
Hi Mark, I did a pip install openleadr --upgrade
Which did a appear to update openleadr, this is a pip list on my machine:
aiohttp 3.8.3
aiosignal 1.3.1
APScheduler 3.9.1.post1
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
async-timeout 4.0.2
attrs 22.1.0
autopep8 2.0.0
bacpypes 0.16.7
certifi 2022.9.24
cffi 1.15.1
chardet 3.0.4
charset-normalizer 2.1.1
cryptography 3.4.8
eight 1.0.1
frozenlist 1.3.3
future 0.18.2
gevent 21.12.0
greenlet 1.1.3.post0
grequests 0.6.0
idna 2.10
Jinja2 3.1.2
lxml 4.9.1
MarkupSafe 2.1.1
modbus-tk 1.1.2
multidict 6.0.2
openleadr 0.5.27
passlib 1.7.4
pip 20.0.2
pkg-resources 0.0.0
ply 3.11
psutil 5.9.1
pycodestyle 2.9.1
pycparser 2.21
PyJWT 1.7.1
pymodbus 2.5.2
pyOpenSSL 19.1.0
pyserial 3.5
python-dateutil 2.8.2
pytz 2022.1
PyYAML 6.0
pyzmq 22.2.1
requests 2.23.0
setuptools 44.0.0
signxml 2.10.1
signxml-openadr 2.9.1
six 1.16.0
tomli 2.0.1
treelib 1.6.1
tzlocal 2.1
urllib3 1.25.11
volttron 8.2 /home/geb/volttron
watchdog 2.1.9
watchdog-gevent 0.1.1
Werkzeug 2.2.1
wheel 0.30.0
ws4py 0.5.1
xmltodict 0.13.0
yarl 1.8.1
zope.event 4.5.0
zope.interface 5.5.0
But when I run afterword's :
vctl install volttron-openadr-ven --tag openadr --agent-config volttron-openadr-ven/config_example1.json
This will still throw an error about the cryptography library:
Traceback (most recent call last):
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 3.4.8 (/home/geb/volttron/env/lib/python3.8/site-packages), Requirement.parse('cryptography==37.0.4'), {'volttron'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/geb/volttron/env/bin/vctl", line 6, in <module>
from pkg_resources import load_entry_point
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
def _initialize_master_working_set():
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/home/geb/volttron/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cryptography==37.0.4' distribution was not found and is required by volttron
Thanks for any tips to try
@bbartling We have a prerelease version that was released last week that addresses this issue. Please try installing that version using pip install volttron-openadr-ven==1.0.1a0
. See https://pypi.org/project/volttron-openadr-ven/1.0.1a0/
Hi Mark,
Was this ever fixed? Am running into the same problem 'cryptography==37.0.4'
@bbartling This was fixed in monolith volttron (see this PR). However, the modular volttron equivalent (i.e. this repo) didn't get the change. I can look into this. In this meantime, to get over this issue, you can update the pyproject.toml file with this change:
# Current
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
volttron = "^10.0.2rc0"
openleadr = "0.5.27"
cryptography = ">=36.0.1,<37.0.0"
# Updated
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
volttron = "^10.0.2rc0"
openleadr = "0.5.27"
cryptography="37.0.4"
See this line of code.
Could I get a tip for how to install the agent with scripts install style? (not modular volttron) I also did a pip install inside the VOLTTRON venv prior to this and noticed some error in the crypto library:
Errors out on: