Dbt dependencies with Poetry

hello. I use poetry as a dependency manager. I developed a dbt solution using dbt 0.15 which requires json-rpc 1.12.3. Poetry (using pip) installed the dependency on my development machine (macbook osx catalina) just fine a month or more ago. Today, trying to deploy to production ubuntu linux (18.04 LT) machine, i ran into a problem. Poetry could not install the dependency because it doesn’t exist. I updated pip within the poetry venv to be sure.

ubuntu@ip-mymachine:~/projects/experience-mart$ poetry install
Installing dependencies from lock file


Package operations: 28 installs, 0 updates, 0 removals

  - Installing json-rpc (1.12.3)

[EnvCommandError]
Command ['/home/ubuntu/.cache/pypoetry/virtualenvs/experience-mart-lma2Kisk-py3.7/bin/pip', 'install', '--no-deps', 'json-rpc==1.12.3'] errored with the following return code 1, and output:
Collecting json-rpc==1.12.3
  ERROR: Could not find a version that satisfies the requirement json-rpc==1.12.3 (from versions: 1.4.0.linux-x86_64, 1.5.0.linux-x86_64, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.9.1, 0.9.2, 0.9.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.1rc1, 1.1rc2, 1.1, 1.2, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11.0, 1.11.1, 1.12.1, 1.12.2, 1.13.0)
ERROR: No matching distribution found for json-rpc==1.12.3
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

ubuntu@ip-mymachine:~/projects/experience-mart$ poetry pip install --upgrade pip
The command "pip" is not defined.
ubuntu@ipmymachine~/projects/experience-mart$ poetry run pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-20.0.2
ubuntu@ip-mymachine:~/projects/experience-mart$ poetry install
Installing dependencies from lock file


Package operations: 28 installs, 0 updates, 0 removals

  - Installing json-rpc (1.12.3)

[EnvCommandError]
Command ['/home/ubuntu/.cache/pypoetry/virtualenvs/experience-mart-lma2Kisk-py3.7/bin/pip', 'install', '--no-deps', 'json-rpc==1.12.3'] errored with the following return code 1, and output:
ERROR: Could not find a version that satisfies the requirement json-rpc==1.12.3 (from versions: 1.4.0.linux-x86_64, 1.5.0.linux-x86_64, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.9.1, 0.9.2, 0.9.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.1rc1, 1.1rc2, 1.1, 1.2, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11.0, 1.11.1, 1.12.1, 1.12.2, 1.13.0)
ERROR: No matching distribution found for json-rpc==1.12.3

Then i checked pyPI and there is no json-rpc 1.12.3 on pyPI at the moment. So…is that what was on my local machine?

experience-mart on  master via 🐍 3.7.5 
➜ poetry show  
...
jmespath                   0.9.4      JSON Matching Expressions
json-rpc                   1.12.3     JSON-RPC transport implementation
jsonschema                 3.1.1      An implementation of JSON Schema validation for Python

I’m not crazy. Good.

So, I had to go back to my dev version and do

poetry update

to update all dependencies to newer acceptable versions.

Hopefully this helps anyone who bumps into similar issues.