<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 3/1/22 10:31 PM, Brutzman, Donald
(Don) (CIV) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BY3PR13MB4884C87B163705D75783D793C4039@BY3PR13MB4884.namprd13.prod.outlook.com">
<ol style="margin-top:0in" type="1" start="5">
<li class="MsoListParagraph"
style="margin-left:-.25in;mso-list:l12 level1 lfo23">Bad news,
still no joy. Following “pip install x3d” and hiding
PYTHONPATH, the PyPi version installed via pip still fails,
now saying:<o:p></o:p></li>
</ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:#00BF00">IT160907-UWALPP+brutzman@IT160907-UWALPP
</span><span style="font-size:9.0pt;font-family:"Lucida
Console";color:#BFBF00">/cygdrive/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida Console"">$
python BoxExample.py<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida Console"">Traceback
(most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida Console"">
File
"C:\x3d-code\<a class="moz-txt-link-abbreviated" href="http://www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter02GeometryPrimitives\BoxExample.py">www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter02GeometryPrimitives\BoxExample.py</a>",
line 23, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida Console"">
import x3d<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida Console"">ModuleNotFoundError:
No module named 'x3d'</span></p>
</blockquote>
<p><br>
</p>
<p>That means that it's simply not finding the location where it's
been installed to. Depending on how your Python is installed
(provided by your operating system, conda, complied by hand
yourself) it may be set up to look at different locations by
default.</p>
<p>> pip show x3d</p>
<p>(after running pip) should show you where the files went. How
does Python know where to look? Again, that depends on how it was
installed. Usually, that's the same place where pip installed
stuff, but apparently that's not the case here. Maybe the pip is
not the same one as the Python. That can happen when there are
several Python version installed on the same system, e.g. one is
installed using conda and one is provided by the operating system.</p>
<p>Typically, they are in the same location:</p>
<p><br>
(base) MoritzAirRoseGold ~> which pip<br>
/Users/guenther/mambaforge/bin/pip<br>
(base) MoritzAirRoseGold ~> which python<br>
/Users/guenther/mambaforge/bin/python<br>
</p>
<p>In that case, pip will install to a directory that python looks
into when using "import".</p>
<p>If instead, the package is installed at a different location,
then PYTHONPATH should be set to the base directory of the
packages, i.e. if you have packages:</p>
<p>/my/dir/x3d</p>
<p>/my/dir/otherpackage1</p>
<p>/my/dir/otherpacakge2</p>
<p>then PYTHONPATH=/my/dir<br>
</p>
<p>not "/my/dir/x3d" (because that way python would look for
/my/dir/x3d/x3d/__init__.py, so one level of x3d too many).</p>
<p>Moritz<br>
</p>
<pre class="moz-signature" cols="72">--
Hans Moritz Günther
Massachusetts Institute of Technology
Kavli Institute for Astrophysics and Space Research
77 Massachusetts Avenue
NE83-569
Cambridge, MA 02139
<a class="moz-txt-link-abbreviated" href="mailto:hgunther@mit.edu">hgunther@mit.edu</a>
<a class="moz-txt-link-freetext" href="https://space.mit.edu/home/guenther/">https://space.mit.edu/home/guenther/</a></pre>
</body>
</html>