Complete setup guide, step-by-step

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

1 Like

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

thanks

2 Likes

I followed your steps and when I hit the ā€œbin/buildoutā€ command the following error show:
mr.developer: Queued ā€˜senaite.apiā€™ for checkout.
mr.developer: Queued ā€˜senaite.coreā€™ for checkout.
mr.developer: Queued ā€˜senaite.core.listingā€™ for checkout.
mr.developer: Queued ā€˜senaite.core.spotlightā€™ for checkout.
mr.developer: Queued ā€˜senaite.core.supermodelā€™ for checkout.
mr.developer: Queued ā€˜senaite.impressā€™ for checkout.
mr.developer: Cloned ā€˜senaite.apiā€™ with git using branch ā€˜masterā€™ from ā€˜git://github.com/senaite/senaite.api.gitā€™.
mr.developer: git cloning of ā€˜senaite.apiā€™ failed.
mr.developer: fatal: unable to connect to github.com:
mr.developer: github.com[0: 140.82.121.4]: errno=Connection timed out
mr.developer:
mr.developer:

Please check your Internet connection, its failing to connect to Github, its timing out

Hello guys Iā€™m new to Senaite and I want to change the default Senaite name to the laboratory name. Thanks