Complete setup guide, step-by-step

Hi @Pulimanti

You are trying to run Senaite 2 using Plone 4.3.19, Senaite 2 requires Plone 5.2.6

Please install and use Plone 5.2.6

I am not sure if “upgrading” Plone by changing your builtout.cfg and versions file to point to Plone 5.2.6 will work

Hi @ronaldm
I erase everything and I followed the official installation guide, but now I’m stuck once again:

(senaite) senaite@senaite-lims:~$ wget --no-check-certificate https://launchpad.net/plone/5.2/5.2.6/+download/Plone-5.2.6-UnifiedInstaller-1.0.tgz
    --2022-04-12 10:27:15--  https://launchpad.net/plone/5.2/5.2.6/+download/Plone-5.2.6-UnifiedInstaller-1.0.tgz
    Resolving launchpad.net (launchpad.net)... 91.189.89.223, 91.189.89.222, 2001:67c:1560:8003::8003, ...
    Connecting to launchpad.net (launchpad.net)|91.189.89.223|:443... connected.
    HTTP request sent, awaiting response... 303 See Other
    Location: https://launchpadlibrarian.net/574555484/Plone-5.2.6-UnifiedInstaller-1.0.tgz [following]
    --2022-04-12 10:27:15--  https://launchpadlibrarian.net/574555484/Plone-5.2.6-UnifiedInstaller-1.0.tgz
    Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 91.189.89.228, 91.189.89.229, 2001:67c:1560:8003::8008, ...
    Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|91.189.89.228|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 5822073 (5.6M) [application/x-tar]
    Saving to: ‘Plone-5.2.6-UnifiedInstaller-1.0.tgz

Plone-5.2.6-UnifiedInstaller 100%[=============================================>]   5.55M  6.78MB/s    in 0.8s    

2022-04-12 10:27:16 (6.78 MB/s) - ‘Plone-5.2.6-UnifiedInstaller-1.0.tgz’ saved [5822073/5822073]
(senaite) senaite@senaite-lims:~$ tar xzf Plone-5.2.6-UnifiedInstaller-1.0.tgz
(senaite) senaite@senaite-lims:~$ cd Plone-5.2.6-UnifiedInstaller-1.0
(senaite) senaite@senaite-lims:~/Plone-5.2.6-UnifiedInstaller-1.0$ ./install.sh standalone --target=/home/senaite --instance=senaitelims --password=admin

Unable to find python3.8 on system exec path.

Please do one of the following:
1) Install python3.8 or python3.6+ as a system dev package\;
2) Use --with-python=... option to point the installer to a useable python.
(senaite) senaite@senaite-lims:~/Plone-5.2.6-UnifiedInstaller-1.0$

So I understand If I install Senaite 2.0 I need Plone 5.2.6 but Plone request Python 3.6+ but Senaite is compatibile just with Python 2.7.

Can someone help us please?

Thanks

Hi @Pulimanti

Senaite runs on Python 2.7. Did you activate your Python environment as per instructions under the install miniconda section

Sure @ronaldm as you can see:

(base) senaite@senaite-lims:~$ conda activate senaite
(senaite) senaite@senaite-lims:~$ sudo apt install build-essential
[sudo] password for senaite: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:

Hi @Pulimanti

Please run which python to check the Python version and post the result here

I get forward and as the software asked me I insert the directory so I typed:

./install.sh standalone --target=/home/senaite --instance=senaitelims --password=admin --with-python=/home/senaite/miniconda2/envs/senaite/bin/python

But it gave me this error:

Unable to find libjpeg library and headers. These are required to build Plone. Please use your system package or port manager to install libjpeg dev. (Debian/Ubuntu libjpeg-dev) Exiting now.

So I did :

sudo apt-get install libjpeg-dev zlib1g-dev

And it Worked but when I launch this command:

(senaite) senaite@senaite-lims:~/senaitelims$ PYTHONHTTPSVERIFY=0 buildout

While:
Installing.
Getting section unifiedinstaller.
Initializing section unifiedinstaller.
Installing recipe plone.recipe.unifiedinstaller.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:

Hi @Pulimanti

Please post the full error message. Please also share your buildout.cfg file or just the versions section

Hi @ronaldm

I checked the buildout.cfg and there were bugs so I decided to format and start over.

I have scrupulously followed the installation procedure making some changes, I hope they can help other people.

Dependecies

(add the following command)

sudo apt-get install libjpeg-dev zlib1g-dev

Download the Plone unified installer

(replace the commands with the following)

wget --no-check-certificate https://launchpad.net/plone/5.2/5.2.6/+download/Plone-5.2.6-UnifiedInstaller-1.0.tgz

tar xzf Plone-5.2.6-UnifiedInstaller-1.0.tgz

cd Plone-5.2.6-UnifiedInstaller-1.0

Install Plone

(replace the commands with the following, you need to specify where it has to point adding to the command --with-python= )

./install.sh standalone --target=/home/senaite --instance=senaitelims --password=admin --with-python=/home/senaite/miniconda2/envs/senaite/bin/python

2 Likes

Hi. i had the instances and plone installed successfully, when i start the plone with the command :

“$cd ~/plone/zinstance”
“$bin/plonectl start”

The plone starts in the terminal but the browser shows “problem loading” anytime i try to connect at http://your-server:8080

Kindly help

Thank you

Hi @Barry

Please run $bin/plonectl fg

and post the result here, there should be an error somewhere

Hi ronaldm. thanks for replying
here’s the display shown after typing the command you gave me

Hi @Barry

Senaite is up and running, please open your browser and go to: localhost:8080 or 0.0.0.0:8080

in the instructions, you need to replace “your-server” with the actual computers IP address

Best
Ronald

Hi @ronaldm
The link is working well thanks so much.

Now my concern is creating the “Buildout.cfg” which is confusing me !
kindly guide me

Thank you

2 Likes

Hi @Barry

my apologies for getting back to you late

Great.

What do you mean? The buildout.cfg is created during the Plone installation, you have to edit it to add your add-ons under the eggs section.

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