Installing on Ubuntu: incompatible version of cryptography when import relations into database

I am installing baserow on ubuntu for the first time using this guide: Installation on Ubuntu // Baserow

On a step " Install dependencies for & setup Baserow" after command pip3 install -e ./baserow/backend I got a warrning :

pyopenssl 22.0.0 has requirement cryptography>=35.0, but you'll have cryptography 3.4.8 which is incompatible

And then on step " Import relations into database" after command baserow migrate i got an error:

(env) root@baserow:/baserow# baserow migrate
Traceback (most recent call last):
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/baserow/env/lib/python3.7/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 (/baserow/env/lib/python3.7/site-packages), Requirement.parse('cryptography>=35.0'), {'pyopenssl'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/baserow/env/bin/baserow", line 4, in <module>
    __import__('pkg_resources').require('baserow==1.8.2')
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/baserow/env/lib/python3.7/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 (/baserow/env/lib/python3.7/site-packages), Requirement.parse('cryptography>=35.0'), {'pyopenssl'})

Please, help to install compatible version of cryptography

@danila I’m working on fix for this for the next version of Baserow. if you want to try get it working asap you could try run the following command and see if it fixes baserow migrate:

pip3 install cryptography==36.0.1

Unfortunately, it didn’t help. maybe I must reinstall backend after pip3 install cryptography==36.0.1 or something else?

(env) root@baserow:/baserow# pip3 install cryptography==36.0.1
Requirement already satisfied: cryptography==36.0.1 in ./env/lib/python3.7/site-packages (36.0.1)
Requirement already satisfied: cffi>=1.12 in ./env/lib/python3.7/site-packages (from cryptography==36.0.1) (1.15.0)
Requirement already satisfied: pycparser in ./env/lib/python3.7/site-packages (from cffi>=1.12->cryptography==36.0.1) (2.21)
(env) root@baserow:/baserow# baserow migrate
Traceback (most recent call last):
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 36.0.1 (/baserow/env/lib/python3.7/site-packages), Requirement.parse('cryptography==3.4.8'), {'baserow'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/baserow/env/bin/baserow", line 4, in <module>
    __import__('pkg_resources').require('baserow==1.8.2')
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cryptography==3.4.8' distribution was not found and is required by baserow
(env) root@baserow:/baserow# deactivate
root@baserow:/baserow# pip3 install cryptography==36.0.1
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
Requirement already satisfied: cryptography==36.0.1 in /usr/local/lib/python3.8/dist-packages (36.0.1)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.8/dist-packages (from cryptography==36.0.1) (1.15.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.12->cryptography==36.0.1) (2.21)
root@baserow:/baserow# source env/bin/activate
(env) root@baserow:/baserow# baserow migrate
Traceback (most recent call last):
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 36.0.1 (/baserow/env/lib/python3.7/site-packages), Requirement.parse('cryptography==3.4.8'), {'baserow'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/baserow/env/bin/baserow", line 4, in <module>
    __import__('pkg_resources').require('baserow==1.8.2')
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/baserow/env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cryptography==3.4.8' distribution was not found and is required by baserow
(env) root@baserow:/baserow#

Ah this error means you also need to change the cryptography version found in the file in the Baserow repo backend/requirements/base.txt so that line looks like this instead:

cryptography==36.0.1

And then you should be able to just do:
pip3 install -e ./baserow/backend again hopefully.

thanx! I finish instalation on ubuntu server in local network! (except HTTPS / SSL Support)
How can i reach frontend and login?

if I try to go to http://192.168.103.109/ or http://192.168.103.109/ I see Bad Request (400)

Are you attempting to reach the machine from another computer on your network? If so then you need to set some extra environment variables to make this work currently:

  • PUBLIC_WEB_FRONTEND_URL needs to be http://192.168.103.109:3000
  • PUBLIC_BACKEND_URL needs to be http://192.168.103.109:8000

See this section of the ubuntu install for more info: Installation on Ubuntu // Baserow