Hi Jan,

Do you need to build cctbx from scratch? The cctbx has been available for Python 3 for a while now, but is using conda packages (https://docs.conda.io/en/latest/) for managing dependencies. Building the dependencies from scratch for multiple versions of Python 3 for multiple platforms was getting too complicated.

You can install cctbx as a conda package for Python 3.6 through 3.9 with support for macOS (Intel and Apple Silicon), linux, and Windows. Instructions can be found here (https://github.com/cctbx/cctbx_project#installation), but essentially it is just

conda install -c conda-forge cctbx-base 

to get it into an existing environment. The smtbx module will be available, but not fast_linalg yet.

Note that with a conda environment, you do not need to run any of the "setpaths" scripts to set it up. Just activate the environment and cctbx will be available in python.

There are also nightly builds of the conda packages on a separate channel (https://github.com/cctbx/cctbx_project#nightly-builds). The command above becomes

conda install -c cctbx-nightly -c conda-forge cctbx-base 

You can also build cctbx with Python 3 using conda packages as dependencies (https://github.com/cctbx/cctbx_project#building-a-development-version). The bootstrap.py command becomes

python bootstrap.py --use-conda --python 38

This will install miniconda if conda is not already available on your system.

You can run

python bootstrap.py --help

to see more options.

There are monthly releases and I will make announcements on this bulletin board from now on to help spread the word.

--
Billy K. Poon
Research Scientist, Molecular Biophysics and Integrated Bioimaging
Lawrence Berkeley National Laboratory
1 Cyclotron Road, M/S 33R0345
Berkeley, CA 94720
Fax: (510) 486-5909


On Fri, Jul 9, 2021 at 4:57 AM Jan M. Simons <marten@ifk.rwth-aachen.de> wrote:
Hi Oleg,

Am 09.07.21 um 13:16 schrieb Oleg Dolomanov:
> Hi Jan,
>
> which way have you been using to build cctbx?

I've been following https://cctbx.github.io/installation.html

(as https://cci.lbl.gov/cctbx_docs/installation.html seems to be the
older/outdated documentation which should perhaps redirect to the newer
one instead.)

Is this not the right documentation on how to build it on a bare bones
linux distribution? (I'm using sabayon, a gentoo derivative)

So right now I've re-tried to execute an up-to-date bootstrap.py with my
system supplied python3.7 and on first attempt it still built python2.7
and then failed with

Installing h5py 2.10.0...
Read and write HDF5 files from Python
  log file is /home/jan/Arbeit/cctbx-dev/base_tmp/h5py_install_log
Traceback (most recent call last):
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
1682, in <module>
    installer(args=sys.argv, log=sys.stdout)
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
256, in __init__
    self.build_dependencies(packages=packages)
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
782, in build_dependencies
    getattr(self, 'build_%s'%i)()
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
1220, in build_h5py
    confirm_import_module='h5py', extra_options=["--no-binary=h5py"])
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
694, in build_python_module_pip
    log=log)
  File
"modules/cctbx_project/libtbx/auto_build/install_base_packages.py", line
359, in call
    return call(args, log=log, verbose=self.verbose, **kwargs)
  File
"/home/jan/Arbeit/cctbx-dev/modules/cctbx_project/libtbx/auto_build/installer_utils.py",
line 55, in call
    raise RuntimeError("Call to '%s' failed with exit code %d" % (args, rc))
RuntimeError: Call to '/home/jan/Arbeit/cctbx-dev/base/bin/python -m pip
install  "h5py==2.10.0" --no-binary=h5py' failed with exit code 1
Process failed with return code 1

Then calling
$ python3 ./bootstrap.py
again it is still compiling, but from the paths I suppose that it's
continuing to only build the python2.7 version (like before).


So, I suppose I'm missing some bit of documentation on how to get it
working with python3.

Thanks for your support
Jan
_______________________________________________
cctbxbb mailing list
cctbxbb@phenix-online.org
http://phenix-online.org/mailman/listinfo/cctbxbb