<div dir="ltr">Don,<div><br>I've upgraded my python, x3d.py and pip as well, and here's what I get.  I'm going to set up a virtual environment next</div><div><br></div><div>john@DESKTOP-8OPL3IE MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python">www.web3d.org/x3d/stylesheets/python</a><br>$ python examples/HelloWorld.py<br>x3d.py package 4.0.60 loaded, have fun with X3D Graphics!<br>Python-to-XML well-formed XML document  test of XML output complete<br>Python-to-XML X3D 3.3 schema validation test of XML output complete<br>Python-to-VRML export of VRML output successful<br>Python-to-JSON export of JSON output successful (under development)<br>python x3d.py load and self-test complete for HelloWorld.py<br><br>john@DESKTOP-8OPL3IE MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python">www.web3d.org/x3d/stylesheets/python</a><br>$ unset PYTHONPATH<br><br>john@DESKTOP-8OPL3IE MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python">www.web3d.org/x3d/stylesheets/python</a><br>$ python examples/HelloWorld.py<br>Traceback (most recent call last):<br>  File "C:\x3d-code\<a href="http://www.web3d.org">www.web3d.org</a>\x3d\stylesheets\python\examples\HelloWorld.py", line 23, in <module><br>    from x3d import *<br>ModuleNotFoundError: No module named 'x3d'<br><br>john@DESKTOP-8OPL3IE MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python">www.web3d.org/x3d/stylesheets/python</a><br>$ export PYTHONPATH=.<br><br>john@DESKTOP-8OPL3IE MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/python">www.web3d.org/x3d/stylesheets/python</a><br>$ python examples/HelloWorld.py<br>x3d.py package 4.0.60 loaded, have fun with X3D Graphics!<br>Python-to-XML well-formed XML document  test of XML output complete<br>Python-to-XML X3D 3.3 schema validation test of XML output complete<br>Python-to-VRML export of VRML output successful<br>Python-to-JSON export of JSON output successful (under development)<br>python x3d.py load and self-test complete for HelloWorld.py<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 5, 2022 at 11:16 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Note despite lots of documentation on the net, I found the following handy for upgrading:<div><br></div><div>$ python -m pip uninstall x3d<br></div><div><br></div><div>Otherwise, I couldn't remove the package.</div><div><br></div><div>Thanks!<br><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 5, 2022 at 8:09 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><p class="MsoNormal">Thanks Moritz for looking at this.  However, we can’t really expect any PyPi user who types “pip install x3d” to go through such a process.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Does latest version work for you? Presumably you are getting the same problem… test reports are helpful.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Perhaps my local installation is incorrect… am just using stock latest python installer from <a href="http://python.org" target="_blank">python.org</a>.  I will do a complete uninstall/reinstall of python 3.10.latest.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Our goal is simplicity.  Still trying to find right incantation in our __init__.py for PyPi.<u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> Hans Moritz Guenther <<a href="mailto:hgunther@mit.edu" target="_blank">hgunther@mit.edu</a>> <br><b>Sent:</b> Friday, March 4, 2022 11:17 AM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; <a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a>; X3D-Public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Cc:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>; Peitso, Loren (CIV) <<a href="mailto:lepeitso@nps.edu" target="_blank">lepeitso@nps.edu</a>><br><b>Subject:</b> Re: [x3d-public] x3d.py package: Some feedback and suggestion for improvement; tuples and lists; updated x3d.py<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p><u></u> <u></u></p><div><p class="MsoNormal">On 3/1/22 10:31 PM, Brutzman, Donald (Don) (CIV) wrote:<u></u><u></u></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><p style="margin-left:0.25in"><u></u><span>5.<span style="font:7pt "Times New Roman"">   </span></span><u></u>Bad news, still no joy.  Following “pip install x3d” and hiding PYTHONPATH, the PyPi version installed via pip still fails, now saying:<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console ;color:#00BF00",serif">IT160907-UWALPP+brutzman@IT160907-UWALPP </span><span style="font-size:9pt;font-family:"Lucida Console ;color:#BFBF00",serif">/cygdrive/c/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives" target="_blank">www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console"">$ python BoxExample.py</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console"">Traceback (most recent call last):</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console"">  File "C:\x3d-code\</span><a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives/BoxExample.py" target="_blank"><span style="font-size:9pt;font-family:"Lucida Console"">www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter02GeometryPrimitives\BoxExample.py</span></a><span style="font-size:9pt;font-family:"Lucida Console"">", line 23, in <module></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console"">    import x3d</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:"Lucida Console"">ModuleNotFoundError: No module named 'x3d'</span><u></u><u></u></p></blockquote><p><u></u> <u></u></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.<u></u><u></u></p><p>> pip show x3d<u></u><u></u></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.<u></u><u></u></p><p>Typically, they are in the same location:<u></u><u></u></p><p><br>(base) MoritzAirRoseGold ~> which pip<br>/Users/guenther/mambaforge/bin/pip<br>(base) MoritzAirRoseGold ~> which python<br>/Users/guenther/mambaforge/bin/python<u></u><u></u></p><p>In that case, pip will install to a directory that python looks into when using "import".<u></u><u></u></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:<u></u><u></u></p><p>/my/dir/x3d<u></u><u></u></p><p>/my/dir/otherpackage1<u></u><u></u></p><p>/my/dir/otherpacakge2<u></u><u></u></p><p>then PYTHONPATH=/my/dir<u></u><u></u></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).<u></u><u></u></p><p>Moritz<u></u><u></u></p><pre>-- <u></u><u></u></pre><pre>Hans Moritz Günther<u></u><u></u></pre><pre>Massachusetts Institute of Technology<u></u><u></u></pre><pre>Kavli Institute for Astrophysics and Space Research<u></u><u></u></pre><pre>77 Massachusetts Avenue<u></u><u></u></pre><pre>NE83-569<u></u><u></u></pre><pre>Cambridge, MA 02139<u></u><u></u></pre><pre><a href="mailto:hgunther@mit.edu" target="_blank">hgunther@mit.edu</a><u></u><u></u></pre><pre><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fspace.mit.edu%2Fhome%2Fguenther%2F&data=04%7C01%7Cbrutzman%40nps.edu%7Cf62c68bdf7ec404bce0c08d9fe139acc%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637820182762284936%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d2TsTeesIF9UmJQYANe3csepjT2rdVVoFxagLBBcgmA%3D&reserved=0" target="_blank">https://space.mit.edu/home/guenther/</a><u></u><u></u></pre></div></div></div></blockquote></div>
</blockquote></div>