<div dir="ltr">I find the easiest way to do this is to install scipy with pip, and use the python associated with that install to be used as the python to compile the cctbx under. <div><br></div><div>P</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 November 2017 at 12:18, Magnus Andersson <span dir="ltr">&lt;<a href="mailto:magnus.andersson@scilifelab.se" target="_blank">magnus.andersson@scilifelab.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>I am not normally using cctbx but I’m trying to run a script that imports modules as follows:</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import sys,io,os</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import subprocess</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import numpy</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import pickle</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import math</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import pylab</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">#import pymol</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import time</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import scipy</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import iotbx.pdb</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import cctbx</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import mmtbx.model</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from scipy.optimize import fmin, fmin_cg, leastsq</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from scipy.interpolate import interp1d</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">import datetime</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from numpy.random import random_sample</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from cctbx.array_family import flex</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">from scitbx.math import superpose</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">I have installed cctbx and run with cctbx.python.</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">How can I import scipy into the cctbx python?</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>Cheers,</div><div><br></div><div>Magnus</div><div><span style="font-variant-ligatures:no-common-ligatures"> </span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><div>####</div><div>Magnus Andersson, Docent, Ph.D.</div><div><br></div><div>Email: <a href="mailto:magnus.andersson@scilifelab.se" target="_blank">magnus.andersson@scilifelab.se</a></div><div>Phone: 0769469872</div><div><br></div><div>Mailing address:</div><div>Science For Life Laboratory</div><div>Alpha 6</div><div>Box 1031</div><div>171 21 Solna</div><div><br></div><div>Visiting address:</div><div>Tomtebodavägen 23A</div><div>171 65 Solna</div></div></div>
</div>
<br></div></div><br>______________________________<wbr>_________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/<wbr>mailman/listinfo/cctbxbb</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:small">-----------------------------------------------------------------</span><br></div><div><div style="font-size:12.8px"><font size="1">P.H. Zwart<br>Staff Scientist</font></div><div style="font-size:12.8px"><font size="1">Molecular Biophysics and Integrated Bioimaging &amp;</font></div><div style="font-size:12.8px"><font size="1">Center for Advanced Mathematics for Energy Research Applications</font></div><div style="font-size:12.8px"><font size="1">Lawrence Berkeley National Laboratories<br>1 Cyclotron Road, Berkeley, CA-94703, USA<br>Cell: 510 289 9246</font></div><div style="font-size:12.8px"><font size="1"><br></font></div><div style="font-size:12.8px"><font size="1">PHENIX:   <a href="http://www.phenix-online.org/" style="color:rgb(17,85,204)" target="_blank">http://www.phenix-online.org</a><br></font></div><div style="font-size:12.8px"><font size="1">CAMERA: <a href="http://camera.lbl.gov/" target="_blank">http://camera.lbl.gov/</a></font></div><div style="font-size:small">-----------------------------------------------------------------</div></div></div></div></div></div></div></div>
</div>