<div dir="ltr">Hi Jan,<div><br></div><div>Good to know about the noexec /tmp error. I&#39;ll have to add a $TMPDIR environment variable since it looks like mounting /tmp as noexec is becoming more common.</div><div><br></div><div>Another note is that the dependencies are updated about every 6 months. The versions and builds of the conda packages used for dependencies are explicitly tracked with their URLs and hashes to ensure reproducibility of the build environment. You can delete the &quot;conda_base&quot; directory and the bootstrap.py command (run in a shell before sourcing any of the &quot;setpaths&quot; files) will recreate it.</div><div><br></div><div>Let us know if you have any other issues. Thanks!</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>--</div><div><span style="font-size:12.8000001907349px">Billy K. Poon</span><br></div></div><div>Research Scientist, Molecular Biophysics and Integrated Bioimaging</div><div>Lawrence Berkeley National Laboratory</div><div>1 Cyclotron Road, M/S 33R0345</div><div>Berkeley, CA 94720</div><div>Fax: (510) 486-5909</div><div>Web: <a href="https://phenix-online.org" target="_blank">https://phenix-online.org</a></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 9, 2021 at 3:00 PM Jan M. Simons &lt;<a href="mailto:marten@ifk.rwth-aachen.de">marten@ifk.rwth-aachen.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Am 09.07.21 um 15:11 schrieb Billy Poon:<br>
&gt; Hi Jan,<br>
&gt; <br>
&gt; Do you need to build cctbx from scratch? The cctbx has been available<br>
&gt; for Python 3 for a while now, but is using conda packages<br>
&gt; (<a href="https://docs.conda.io/en/latest/" rel="noreferrer" target="_blank">https://docs.conda.io/en/latest/</a> &lt;<a href="https://docs.conda.io/en/latest/" rel="noreferrer" target="_blank">https://docs.conda.io/en/latest/</a>&gt;)<br>
&gt; for managing dependencies. Building the dependencies from scratch for<br>
&gt; multiple versions of Python 3 for multiple platforms was getting too<br>
&gt; complicated.<br>
&gt; <br>
&gt; You can install cctbx as a conda package for Python 3.6 through 3.9 with<br>
&gt; support for macOS (Intel and Apple Silicon), linux, and Windows.<br>
&gt; Instructions can be found here<br>
&gt; (<a href="https://github.com/cctbx/cctbx_project#installation" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#installation</a><br>
&gt; &lt;<a href="https://github.com/cctbx/cctbx_project#installation" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#installation</a>&gt;), but essentially<br>
&gt; it is just<br>
&gt; <br>
&gt; conda install -c conda-forge cctbx-base <br>
&gt; <br>
&gt; to get it into an existing environment. The smtbx module will be<br>
&gt; available, but not fast_linalg yet.<br>
&gt; <br>
&gt; Note that with a conda environment, you do not need to run any of the<br>
&gt; &quot;setpaths&quot; scripts to set it up. Just activate the environment and cctbx<br>
&gt; will be available in python.<br>
&gt; <br>
&gt; There are also nightly builds of the conda packages on a separate<br>
&gt; channel (<a href="https://github.com/cctbx/cctbx_project#nightly-builds" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#nightly-builds</a><br>
&gt; &lt;<a href="https://github.com/cctbx/cctbx_project#nightly-builds" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#nightly-builds</a>&gt;). The command<br>
&gt; above becomes<br>
&gt; <br>
&gt; conda install -c cctbx-nightly -c conda-forge cctbx-base <br>
&gt; <br>
&gt; You can also build cctbx with Python 3 using conda packages as<br>
&gt; dependencies<br>
&gt; (<a href="https://github.com/cctbx/cctbx_project#building-a-development-version" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#building-a-development-version</a><br>
&gt; &lt;<a href="https://github.com/cctbx/cctbx_project#building-a-development-version" rel="noreferrer" target="_blank">https://github.com/cctbx/cctbx_project#building-a-development-version</a>&gt;). The<br>
&gt; bootstrap.py command becomes<br>
&gt; <br>
&gt; python bootstrap.py --use-conda --python 38<br>
&gt; <br>
&gt; This will install miniconda if conda is not already available on your<br>
&gt; system.<br>
<br>
As I did not have conda installed I went for this option and at first I<br>
encountered this:<br>
<br>
===== Running in .: base<br>
Location of conda installation not provided<br>
Proceeding with a fresh installation<br>
Downloading<br>
<a href="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" rel="noreferrer" target="_blank">https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh</a><br>
Downloaded file to<br>
/home/jan/Arbeit/cctbx-dev/Miniconda3-latest-Linux-x86_64.sh<br>
Installing miniconda to &quot;/home/jan/Arbeit/cctbx-dev/mc3&quot;<br>
/home/jan/Arbeit/cctbx-dev/mc3/conda.exe: error while loading shared<br>
libraries: libz.so.1: failed to map segment from shared object<br>
/home/jan/Arbeit/cctbx-dev/mc3/conda.exe: error while loading shared<br>
libraries: libz.so.1: failed to map segment from shared object<br>
Traceback (most recent call last):<br>
  File &quot;modules/cctbx_project/libtbx/auto_build/install_conda.py&quot;, line<br>
1093, in &lt;module&gt;<br>
    sys.exit(run())<br>
  File &quot;modules/cctbx_project/libtbx/auto_build/install_conda.py&quot;, line<br>
1069, in run<br>
    verbose=namespace.verbose)<br>
  File &quot;modules/cctbx_project/libtbx/auto_build/install_conda.py&quot;, line<br>
326, in __init__<br>
    self.conda_base = self.install_miniconda(prefix=self.root_dir)<br>
  File &quot;modules/cctbx_project/libtbx/auto_build/install_conda.py&quot;, line<br>
543, in install_miniconda<br>
    output = check_output(command_list, env=self.env)<br>
  File<br>
&quot;/home/jan/Arbeit/cctbx-dev/modules/cctbx_project/libtbx/auto_build/installer_utils.py&quot;,<br>
line 68, in check_output<br>
    raise RuntimeError(&quot;Call to &#39;%s&#39; failed with exit code %d&quot; %<br>
(popenargs, retcode))<br>
RuntimeError: Call to &#39;([&#39;/bin/sh&#39;,<br>
&#39;/home/jan/Arbeit/cctbx-dev/Miniconda3-latest-Linux-x86_64.sh&#39;, &#39;-b -u<br>
-p &quot;/home/jan/Arbeit/cctbx-dev/mc3&quot;&#39;],)&#39; failed with exit code 1<br>
Process failed with return code 1<br>
<br>
<br>
But after a little research [1] I found the cause to be a noexec /tmp.<br>
<br>
Remounting /tmp exec made the bootstrap succeed and now I&#39;m happy with<br>
<br>
$ /home/jan/Arbeit/cctbx-dev/build/bin/cctbx.python<br>
Python 3.8.6 | packaged by conda-forge | (default, Oct  7 2020, 19:08:05)<br>
[GCC 7.5.0] on linux<br>
<br>
So on to finally moving my codebase to Python3.<br>
<br>
Thank you all for your support and have a nice weekend<br>
<br>
Jan<br>
<br>
<br>
<br>
[1]<br>
<a href="https://stackoverflow.com/questions/60106630/conda-exe-error-while-loading-shared-libraries-libz-so-1" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/60106630/conda-exe-error-while-loading-shared-libraries-libz-so-1</a><br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div>