Complete setup guide, step-by-step

please is there a step guide for ubuntu 20.04?

Can someone help me, please :slight_smile:
I followed all the steps for the Senaite installation and it “kind of” works.

However:


 senaite@vitia-ThinkPad-T14-Gen-1:~/senaitelims$ which buildout
/home/training/miniconda2/envs/senaite/bin/buildout
/home/senaite/miniconda2/envs/senaite/bin/buildout
-bash: /home/training/miniconda2/envs/senaite/bin/buildout: No such file or directory

Then:

(senaite) senaite@vitia-ThinkPad-T14-Gen-1:~/senaitelims$ PYTHONHTTPSVERIFY=0 buildout
Error processing line 1 of /home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site.py", line 169, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
Getting distribution for 'ZODB3==3.10.5'.
Error processing line 1 of /home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site.py", line 169, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
Traceback (most recent call last):
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 44, in _execfile
    code = compile(script, filename, 'exec')
  File "/tmp/easy_install-4ey6fw7k/ZODB3-3.10.5/setup.py", line 34
    print "This version of ZODB requires Python 2.5 or higher"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("This version of ZODB requires Python 2.5 or higher")?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 2308, in main
    setup(
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 412, in run
    self.easy_install(spec, not self.no_deps)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 654, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 699, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 884, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1152, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1138, in run_setup
    run_setup(setup_script, args)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/setuptools/sandbox.py", line 44, in _execfile
    code = compile(script, filename, 'exec')
  File "/tmp/easy_install-4ey6fw7k/ZODB3-3.10.5/setup.py", line 34
    print "This version of ZODB requires Python 2.5 or higher"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("This version of ZODB requires Python 2.5 or higher")?
An error occurred when trying to install /home/senaite/buildout-cache/downloads/dist/ZODB3-3.10.5.tar.gz. Look above this message for any errors that were output by easy_install.
While:
  Installing.
  Getting section instance.
  Initializing section instance.
  Installing recipe plone.recipe.zope2instance.
  Getting distribution for 'ZODB3==3.10.5'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 701, in install
    [self[part]['recipe'] for part in install_parts]
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 701, in <listcomp>
    [self[part]['recipe'] for part in install_parts]
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 1324, in __getitem__
    options._initialize()
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 1432, in _initialize
    self.initialize()
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 1438, in initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/buildout.py", line 1381, in _install_and_load
    zc.buildout.easy_install.install(
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/easy_install.py", line 730, in install
    for dist in self._get_dist(req, ws):
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/home/senaite/miniconda2/envs/senaite/lib/python3.8/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: not enough values to unpack (expected 1, got 0)

I can still make it run:

(senaite) senaite@vitia-ThinkPad-T14-Gen-1:~/senaitelims$ bin/instance fg
2022-05-19 12:41:31 INFO ZServer HTTP server started at Thu May 19 12:41:31 2022
	Hostname: 0.0.0.0
	Port: 8080
2022-05-19 12:41:33 INFO Plone OpenID system packages not installed, OpenID support not available
2022-05-19 12:41:35 INFO Zope Ready to handle requests

But then it looks like a PLONE website, not SENAITE. I guess SEnaite is not really loading.
What do I do wrong?

My buildout.cfg looks like this

[buildout]

extends =
    base.cfg
    versions.cfg

effective-user = senaite

buildout-user = senaite
need-sudo = no

eggs =
    Plone
    Pillow
    senaite.lims
    simplejson

zcml =
develop =
var-dir=${buildout:directory}/var
backups-dir=${buildout:var-dir}
user=admin:admin
deprecation-warnings = off
verbose-security = off
parts =
    instance
    repozo
    backup
    zopepy
    unifiedinstaller

[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8080

[versions]
zc.buildout =
setuptools =
Pillow = 5.1.0
cssselect2 = 0.2.2
soupsieve = 1.9.5

buildout.sanitycheck = 1.0.2
collective.recipe.backup = 4.0
plone.recipe.unifiedinstaller = 5.0.4

You are using python 3.8, which is not yet compatible with Senaite 2.x. Please use 2.7.18 and a buildout.cfg that looks like this one: senaite.docker/buildout.cfg at master · senaite/senaite.docker · GitHub

Thanks. I can’t get my mind around dependencies. When I use the python 2.7 then the instalattion is complaining that it’s not compatible with the Plone version etc :smiley:

In the end I used the docker container version and everything worked.
Greets

Hi @ronaldm
thank you for your reply.
i’ve manage to install senaite successfully.

thanks

2 Likes