[x3d-public] X3D python again... finally working

John Carlson yottzumm at gmail.com
Sun Mar 24 23:56:51 PDT 2019


Okay, I think you’ve caught up to me in the pyjnius folder.   What’s next
is modifying *.future.py (by way of  modifying
PythonPipeliningSerializer.js).   Or we can possibly modify
X3Dautoclass.py.  Attempts at the latter produced pythonapi, a replacement.
  So per your suggestions, I suggest we pursue changing the serializer.   I
think what is happening is set... is not returning a type that add... can
understand.   So it would seem to indicate adding a pyjnius cast.   But I
haven’t figured out how to add the cast to the serializer without making
the *.future.py like the *.py files.   So I have been pursuing the
pythonapi approach.   The pythonapi approach will allow for the other two
styles of API.   But pyjnius probably deserves more looking at.   I do
however want to keep the user code clean, so putting casts in the
serializer is undesirable.

Perhaps we could create a package between the user code and the pyjnius
code.

John
On Mon, Mar 25, 2019 at 1:26 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> OK, much trial + error but finally some more progress.  I am working
> primarily on build.xml in local directory
>
> C:\x3d-code\www.web3d.org\x3d\stylesheets\java\src\python\pyjnius
>
> =================
>
> 1. First note that the pyjunius documentation is erroneous about
> JAVA_HOME, first it is old (am using latest jdk1.8) and second there is no
> "bin" appended.
>
> I didn't erroneously append "bin" and that omission didn't hurt anything.
>
> =================
>
> 2. Fixed the missing DLL problem in Ant in manner you suggested, rather
> than customizing my computer's system properties in an unrepeatable fashion.
>
> Modifications to build.xml follow:
>
>      <!-- properties common to all build files and archives
> ======================================== -->
>      <property environment="env"/>
>
>      <!--
> https://stackoverflow.com/questions/20970732/jnius-1-1-import-error -->
>      <!-- https://pyjnius.readthedocs.io/en/stable/installation.html -->
>      <!-- TODO other OS variants needed? -->
>      <property name="pyjnius.configurationPath"
> value="${env.JAVA_HOME}/jre/bin/server;${env.Path}"/><!-- help pyjnius find
> jvm.dll -->
>
>      <target name="processScenes.python" description="generate new X3d
> files" depends="">
>          <!-- http://ant.apache.org/manual/Tasks/echoproperties.html -->
>          <!--  debug: inspect output to note OS-specific capitalization of
> env.Path -->
>          <echoproperties regex="env.(P|p)(A|a)(T|t)(H|h)$" />
>
>          <echo message="JAVA_HOME=${env.JAVA_HOME}"/>
>          <echo message="Windows
> pyjnius.configurationPath=${pyjnius.configurationPath}"/>
> [...]
>
> and
>
>      <target name="processScene.python" description="generate new X3D
> file" depends="">
>          <!-- https://pyjnius.readthedocs.io -->
>
>          <!-- https://ant.apache.org/manual-1.9.x/Tasks/exec.html
> Examples -->
>          <exec executable="python">
>              <!--
> https://stackoverflow.com/questions/5607580/how-to-set-the-path-environment-variable-from-ant-script
> -->
>              <env key="Path" path="${pyjnius.configurationPath}"/>
>              <arg value="${theFile}"/>
>          </exec>
>          <echo message="${theFile}"/>
>      </target>
>
> =================
>
> 3. Some versionitis confusion: there is an ~identical build.xml (and other
> similar files) in subdirectory /pythonapi
>
> Is that directory needed?  For now I ignored it.
>
> =================
>
> 4. New error, the python files are finding jnius and starting to run but
> not finding the autogenerated X3Dautoclass.py
>
> Example error log from ant target processScenes.python output:
>
> C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\CAD\
> CadDesignPatternExampleBushing.future.py
> processScene.python:
> Traceback (most recent call last):
>    File "C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\CAD\CadDesignPatternExampleBushing.py",
> line 4, in <module>
>      from X3Dautoclass import *
> ModuleNotFoundError: No module named 'X3Dautoclass'
> Result: 1
>
> Presumably this is a PYTHONPATH problem, it is not finding your
> X3Dautoclass.py
>
> Documentation:
> https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
>
> added:
>
>      <property name="pyjnius.X3DautoclassPath" location="."/>
>
> and then
>          <exec executable="python">
>              <!--
> https://stackoverflow.com/questions/5607580/how-to-set-the-path-environment-variable-from-ant-script
> -->
>              <env key="Path"       path="${pyjnius.configurationPath}"/>
>              <env key="PYTHONPATH" path="${pyjnius.X3DautoclassPath}"/>
>              <arg value="${theFile}"/>
>          </exec>
>
> fixed!
>
> =================
>
> 5. OK, /finally/ in motion with python reporting X3DJSAIL diagnostics!
>  example output:
>
> =====================
> processScene.python:
> Loading X3D .py python model, if successful then saving as .x3d version:
> C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\CAD\
> CatiaHubAssemblyCombined.future.py
> Traceback (most recent call last):
>    File "C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\CAD\
> CatiaHubAssemblyCombined.future.py", line 68, in <module>
>      .setDescription("Hello CatiaHubAssemblyCombined") \
> AttributeError: 'org.web3d.x3d.sai.Navigation.X3DViewpointNode' object has
> no attribute 'setPosition'
> Result: 1
> =====================
> processScene.python:
> Loading X3D .py python model, if successful then saving as .x3d version:
> C:\x3d-code\www.web3d.org
> \x3d\content\examples\Basic\CAD\CatiaHubAssemblyCombined.py
> Warning: /x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CatiaHubAssemblyCombined.new.x3d
> does not meet suggested X3D naming conventions, output serialization
> continuing...
> Warning: toFileX3D() is overwriting prior file /x3d-code/
> www.web3d.org/x3d/content/examples/Basic/CAD/CatiaHubAssemblyCombined.new.x3d
> =====================
>
> so we can make some actual progress on the X3D Python language binding
> together now.  hooray!
>
> have already added a small improvement to X3DJSAIL, validate() now
> includes model diagnostic warning message when meta error, warning, hint or
> info is found.  this can help a lot in deciphering X3DJSAIL output when
> validation finds any other .x3d scene errors that are intentionally
> included to be caught for testing purposes.
>
> have checked in changes, deploying X3DJSAIL updates (and X3DUOM/schema
> tweaks) tonite.
>
> thanks for your patience and gigantic progress John.  8)
>
> having fun with X3D Python!
>
>
> On 3/20/2019 12:04 AM, John Carlson wrote:
> > Add to your Environment Variables <
> https://en.wikipedia.org/wiki/Environment_variable>:
> >
> > ·JAVA_HOME: C:\Program Files\Java\jdk1.7.0_79\bin
> >
> > ·PATH: C:\Program Files\Java\jdk1.7.0_79\jre\bin\server contains the
> jvm.dll necessary for importing and using PyJNIus.
> >
> > *Note*
> >
> > set PATH=%PATH%;C:\Program Files\Java\jdk1.7.0_79\jre\bin\server
> >
> > *Add to System Variables or have it present in your **PATH**:*
> >
> > ·PATH: C:\Program Files\Java\jdk1.7.0_79\bin`
> >
> > Note that you must add two Java folders to your PATH.  Please try Java
> 8, not jdk1.7
> >
> > We will have to figure out how to add to the PATH in the installation, I
> guess.  Worth a google.
> >
> > John
> >
> > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
> >
> > *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> > *Sent: *Tuesday, March 19, 2019 8:51 AM
> > *To: *John Carlson <mailto:yottzumm at gmail.com>
> > *Cc: *x3d-public at web3d.org <mailto:x3d-public at web3d.org>
> > *Subject: *Re: X3D python again
> >
> > Thanks but... nothing else seen.
> >
> > In general we are trying to make this as repeatable as possible.  Do the
> build and the instructions should be sufficient for anyone.
> >
> > Perhaps you have a pyjnius configuration on your system that is missing
> from the build directions? Or perhaps we have different pyjnius versions?
> Or perhaps some pyjnius tests need to be part of our build script?
> >
> > TIA for all sleuthing, i can return to this task on the weekend.
> >
> > v/r Don
> >
> >
> >
> > Sent from my handheld device
> >
> >
> > On Mar 17, 2019, at 4:02 PM, John Carlson <yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>> wrote:
> >
> >     Looks like a dll is missing from your path?
> >
> >     Google might be your friend.  I will look into this after going
> through my mail.
> >
> >     John
> >
> >     Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
> >
> >     *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> >     *Sent: *Sunday, March 17, 2019 5:10 PM
> >     *To: *John Carlson <mailto:yottzumm at gmail.com>
> >     *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> >     *Subject: *Re: X3D python again
> >
> >     Continued progress.
> >
> >     a. All of the configuration.prerequisite steps are running cleanly
> now:
> >
> >     ant -f C:\\x3d-code\\www.web3d.org <http://www.web3d.org>\\x3d\\stylesheets\\java\\src\\python\\pyjnius
> configuration.prerequisites
> >
> >     configuration.prerequisites:
> >
> >     ensure needed libraries are installed (initial installs likely to
> require administrator login)
> >
> >     =================================
> >
> >     node.js and npm are required https://nodejs.org/en
> https://docs.npmjs.com/cli/install
> >
> >     npm.cmd install
> >
> >     audited 34 packages in 0.969s
> >
> >     found 0 vulnerabilities
> >
> >     npm.cmd version
> >
> >     { pythonSAI: '1.0.0',
> >
> >         npm: '6.4.1',
> >
> >         ares: '1.15.0',
> >
> >         cldr: '33.1',
> >
> >         http_parser: '2.8.0',
> >
> >         icu: '62.1',
> >
> >         modules: '64',
> >
> >         napi: '3',
> >
> >         nghttp2: '1.34.0',
> >
> >         node: '10.14.2',
> >
> >         openssl: '1.1.0j',
> >
> >         tz: '2018e',
> >
> >         unicode: '11.0',
> >
> >         uv: '1.23.2',
> >
> >         v8: '6.8.275.32-node.45',
> >
> >         zlib: '1.2.11' }
> >
> >     npm.cmd audit
> >
> >     === npm audit security report ===
> >
> >     found 0 vulnerabilities
> >
> >        in 34 scanned packages
> >
> >     =================================
> >
> >     java version "1.8.0_202"
> >
> >     Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
> >
> >     Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
> >
> >     Python 3.7.2
> >
> >     =================================
> >
> >     Pyjnius is a Python library for accessing Java classes,
> >
> >     refer to Pyjnius page for JAVA_HOME and PATH requirements
> >
> >     https://pyjnius.readthedocs.io/en/latest/installation.html
> >
> >     Requirement already up-to-date: pip in c:\program
> files\python37\lib\site-packages (19.0.3)
> >
> >     Requirement already up-to-date: setuptools in c:\program
> files\python37\lib\site-packages (40.8.0)
> >
> >     Requirement already up-to-date: cython in c:\program
> files\python37\lib\site-packages (0.29.6)
> >
> >     Requirement already up-to-date: pyjnius in c:\program
> files\python37\lib\site-packages (1.2.0)
> >
> >     Requirement already satisfied, skipping upgrade: six>=1.7.0 in
> c:\program files\python37\lib\site-packages (from pyjnius) (1.12.0)
> >
> >     Requirement already satisfied, skipping upgrade: cython in
> c:\program files\python37\lib\site-packages (from pyjnius) (0.29.6)
> >
> >     =================================
> >
> >     BUILD SUCCESSFUL (total time: 8 seconds)
> >
> >     b. targets 'configuration' and 'processScenes.x3d' also working.  8)
> >
> >     c. however processScenes.python is failing mysteriously...
> apparently pyjnius creation is not correct, each scene is failing
> identically.
> >
> >     example excerpts:
> >
> >     =======================================================
> >
> >     processScene.python:
> >
> >            [exec] Traceback (most recent call last):
> >
> >            [exec]   File "C:\x3d-code\www.web3d.org <
> http://www.web3d.org>\x3d\content\examples\Basic\CAD\CadGeometryPrototypes.py",
> line 3, in <module>
> >
> >            [exec]     from jnius import autoclass
> >
> >            [exec]   File "C:\Program
> Files\Python37\lib\site-packages\jnius\__init__.py", line 12, in <module>
> >
> >            [exec]     from .jnius import *  # noqa
> >
> >            [exec] ImportError: DLL load failed: The specified module
> could not be found.
> >
> >            [exec] Result: 1
> >
> >            [echo] C:\x3d-code\www.web3d.org <http://www.web3d.org
> >\x3d\content\examples\Basic\CAD\CadGeometryPrototypes.py
> >
> >     processScene.python:
> >
> >            [exec] Traceback (most recent call last):
> >
> >            [exec]   File "C:\x3d-code\www.web3d.org <
> http://www.web3d.org>\x3d\content\examples\Basic\CAD\CadTeapot.future.py",
> line 3, in <module>
> >
> >            [exec]     from jnius import autoclass
> >
> >            [exec]   File "C:\Program
> Files\Python37\lib\site-packages\jnius\__init__.py", line 12, in <module>
> >
> >            [exec]     from .jnius import *  # noqa
> >
> >            [exec] ImportError: DLL load failed: The specified module
> could not be found.
> >
> >            [exec] Result: 1
> >
> >            [echo] C:\x3d-code\www.web3d.org <http://www.web3d.org
> >\x3d\content\examples\Basic\CAD\CadTeapot.future.py
> >
> >     =======================================================
> >
> >     here is what the pyjnius directory looks like:
> >
> >     /cygdrive/c/x3d-code/
> www.web3d.org/x3d/stylesheets/java/src/python/pyjnius <
> http://www.web3d.org/x3d/stylesheets/java/src/python/pyjnius>
> >
> >     $ ls -al
> >
> >     total 97858
> >
> >     drwxrwx---+ 1 brutzman None        0 Mar 17 14:54 .
> >
> >     drwxrwx---+ 1 brutzman None        0 Mar 16 21:21 ..
> >
> >     -rwxrwx---+ 1 brutzman None     1775 Nov  1 00:33 abox.x3d
> >
> >     -rwxrwx---+ 1 brutzman None     2500 Mar 17 14:06 autoclass.py
> >
> >     -rwxrwx---+ 1 brutzman None     7521 Mar 17 14:54
> build.install.dependencies.txt
> >
> >     -rwxrwx---+ 1 brutzman None    10674 Mar 17 14:58 build.xml
> >
> >     -rwxrwx---+ 1 brutzman None     2226 Dec  2 14:04 convertXML.js
> >
> >     -rwxrwx---+ 1 brutzman None    91277 Mar 17 14:50 fieldTypes.js
> >
> >     -rwxrwx---+ 1 brutzman None     1887 Mar 17 14:06 fieldTypes.py
> >
> >     -rwxrwx---+ 1 brutzman None 99092818 Feb 19 15:05 main.jar
> >
> >     -rwxrwx---+ 1 brutzman None   754258 Mar 17 14:50 mapToMethod.js
> >
> >     -rwxrwx---+ 1 brutzman None     5062 Mar 17 14:06 mapToMethod.py
> >
> >     -rwxrwx---+ 1 brutzman None     2403 Nov  1 00:33 mapToMethod2.js
> >
> >     drwxrwx---+ 1 brutzman None        0 Dec 12 15:49 nbproject
> >
> >     drwxrwx---+ 1 brutzman None        0 Mar 17 14:46 node_modules
> >
> >     -rwxrwx---+ 1 brutzman None      134 Mar 17 14:45 package.json
> >
> >     -rwxrwx---+ 1 brutzman None     4408 Mar 17 14:45 package-lock.json
> >
> >     -rwxrwx---+ 1 brutzman None    78905 Dec 24 10:15 PyJNIusWorkflow.pdf
> >
> >     -rwxrwx---+ 1 brutzman None    37453 Dec 24 10:15
> PyJNIusWorkflow.pptx
> >
> >     -rwxrwx---+ 1 brutzman None    12230 Feb 10 19:50
> PythonPipeliningSerializer.js
> >
> >     -rwxrwx---+ 1 brutzman None    12224 Feb 10 19:50 PythonSerializer.js
> >
> >     -rwxrwx---+ 1 brutzman None      116 Mar 12 15:59 README.md
> >
> >     -rwxrwx---+ 1 brutzman None    29001 Mar 17 14:50 X3Dautoclass.py
> >
> >     -rwxrwx---+ 1 brutzman None      341 Dec  2 14:04 xml2all.js
> >
> >     not sure what to do.  missing property or file perhaps?  back to you
> John...
> >
> >     On 3/16/2019 9:29 PM, Brutzman, Donald (Don) (CIV) wrote:
> >
> >      > BLUF: finally got past multiple setup difficulties on Windows 10,
> several issues addressed.  More work needed.
> >
> >      >
> >
> >      > Providing this record to help us finish build reconciliations and
> potentially assist others encountering similar difficulties.
> >
> >      >
> >
> >      > Thanks for Loren Peitso for helpful python advice.  (Incidentally
> he recommends _not_ using pycharm as it contains some irregularities).
> >
> >      >
> >
> >      > Pyjnius still croaking, see log below.  Is Microsoft Visual C++
> actually needed?
> >
> >      >
> >
> >      > Jacoco still croaking.  Now commented out, probably best to get
> everything else working first.  If you want to replace  with your local
> version in the lib directory, please go ahead.
> >
> >      >
> >
> >      > Future: wondering, can't we avoid beautiful soup and lxml
> altogether by using stock Python libraries?
> >
> >      >
> >
> >      > Some success!  Target processScenes.x3d now creating filename.py
> and filename.future.py outputs, examples attached.
> >
> >      >
> >
> >      > Target processScenes.python not working, perhaps because pyjnius
> build isn't yet successful?  Excerpt:
> >
> >      >
> >
> >      > C:\x3d-code\www.web3d.org <http://www.web3d.org
> >\x3d\content\examples\Basic\CAD\CadGeometryExternPrototypes.future.py
> >
> >      > processScene.python:
> >
> >      > Traceback (most recent call last):
> >
> >      >     File "C:\x3d-code\www.web3d.org <http://www.web3d.org>\x3d\content\examples\Basic\CAD\CadGeometryExternPrototypes.py",
> line 1, in <module>
> >
> >      >       import jnius_config
> >
> >      > ModuleNotFoundError: No module named 'jnius_config'
> >
> >      > Result: 1
> >
> >      >
> >
> >      > All this work now checked into subversion.  Good luck with next
> steps, we are getting closer.
> >
> >      >
> >
> >      > Am hoping we can continue to simplify and simplify.  This
> approach will make this implementation as portable as possible.  Looking
> forward to continued spiral development and improvement, improving the
> language syntax for X3D in Python.
> >
> >      >
> >
> >      > Troubleshooting log follows.
> >
> >      >
> >
> >      >
> ======================================================================
> >
> >      >
> >
> >      > Following another troubled install of anaconda (navigator not
> working) on Windows 10, ripped everything out again.
> >
> >      >
> >
> >      > Reinstalled stock python 3.7.2 again from python.org <
> http://python.org> as localadmin for all users.  also included in path
> and confirmed working:
> >
> >      >
> >
> >      > $ python --version
> >
> >      > Python 3.7.2
> >
> >      >
> >
> >      > Then ran build.xml target 'configure' as discussed on last call.
> Progress: it ran, though quickly failing.
> >
> >      >
> >
> >      > ======================
> >
> >      > build.xml
> >
> >      >
> >
> >      >       <target name="configuration" description="Test Python
> output">
> >
> >      >           <echo message="create imported files: autoclass.py
> fieldtypes.py mapToMethod.py"/>
> >
> >      >           <exec executable="python">
> >
> >      >               <arg value="autoclass.py"/>
> >
> >      >           </exec>
> >
> >      > [...]
> >
> >      > ======================
> >
> >      > ant -f C:\\x3d-code\\www.web3d.org <http://www.web3d.org>\\x3d\\stylesheets\\java\\src\\python\\pyjnius
> configuration
> >
> >      > configuration:
> >
> >      > create imported files: autoclass.py fieldtypes.py mapToMethod.py
> >
> >      > Traceback (most recent call last):
> >
> >      >     File "autoclass.py", line 1, in <module>
> >
> >      >       from bs4 import BeautifulSoup
> >
> >      > ModuleNotFoundError: No module named 'bs4'
> >
> >      > Result: 1 [...]
> >
> >      > ======================
> >
> >      >
> >
> >      > looked up that error, search led to
> >
> >      >
> >
> >      > How can I from bs4 import BeautifulSoup?
> >
> >      >
> https://stackoverflow.com/questions/18831380/how-can-i-from-bs4-import-beautifulsoup
> >
> >      >
> >
> >      > which recommended
> >
> >      >
> >
> >      > pip install beautifulsoup4
> >
> >      >
> >
> >      > which produced two errors, even when running bash with
> administrator permissions:
> >
> >      >
> >
> >      > ============================
> >
> >      > $ pip install beautifulsoup4
> >
> >      > Collecting beautifulsoup4
> >
> >      >     Downloading
> https://files.pythonhosted.org/packages/1d/5d/3260694a59df0ec52f8b4883f5d23b130bc237602a1411fa670eae12351e/beautifulsoup4-4.7.1-py3-none-any.whl
> (94kB)
> >
> >      > Collecting soupsieve>=1.2 (from beautifulsoup4)
> >
> >      >     Downloading
> https://files.pythonhosted.org/packages/77/78/bca00cc9fa70bba1226ee70a42bf375c4e048fe69066a0d9b5e69bc2a79a/soupsieve-1.8-py2.py3-none-any.whl
> (88kB)
> >
> >      > Installing collected packages: soupsieve, beautifulsoup4
> >
> >      > Could not install packages due to an EnvironmentError: [WinError
> 5] Access is denied: 'c:\\program files
> (x86)\\python37-32\\Lib\\site-packages\\soupsieve'
> >
> >      > Consider using the `--user` option or check the permissions.
> >
> >      >
> >
> >      > You are using pip version 18.1, however version 19.0.3 is
> available.
> >
> >      > You should consider upgrading via the 'python -m pip install
> --upgrade pip' command.
> >
> >      > ============================
> >
> >      >
> >
> >      > Tried again, still failed.  Then noted that path started with
> >
> >      >
> >
> >      >             c:\\program files (x86)\\python37-32
> >
> >      >
> >
> >      > which is 32 bit.  This means that the python download page wasn't
> able to distinguish 32--bit or 64-bit.
> >
> >      >
> >
> >      > Ripped it all out again, cleaned up PATH (the uninstaller didn't
> do that).  Rebooted.
> >
> >      >
> >
> >      > Went back to python download page and specifically
> found/downloaded/installed 64-bit Python 3.7.2 for Windows.  Great care
> required in selecting the correct installer, this is buried within multiple
> lists.
> >
> >      >
> >
> >      > https://www.python.org/downloads/windows/
> >
> >      >
> >
> >      > Installed with all options including PATH, excluding debugger
> options.
> >
> >      >
> >
> >      > Ran bash shell as administrator to update pip and beautifulsoup4
> as indicated above.
> >
> >      >
> >
> >      > =====================================
> >
> >      > $ python -m pip install --upgrade pip
> >
> >      > Collecting pip
> >
> >      >     Using cached
> https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
> >
> >      > Installing collected packages: pip
> >
> >      >     Found existing installation: pip 18.1
> >
> >      >       Uninstalling pip-18.1:
> >
> >      >         Successfully uninstalled pip-18.1
> >
> >      > Successfully installed pip-19.0.3
> >
> >      > =====================================
> >
> >      > $ pip install beautifulsoup4
> >
> >      > Collecting beautifulsoup4
> >
> >      >     Downloading
> https://files.pythonhosted.org/packages/1d/5d/3260694a59df0ec52f8b4883f5d23b130bc237602a1411fa670eae12351e/beautifulsoup4-4.7.1-py3-none-any.whl
> (94kB)
> >
> >      > Collecting soupsieve>=1.2 (from beautifulsoup4)
> >
> >      >     Downloading
> https://files.pythonhosted.org/packages/77/78/bca00cc9fa70bba1226ee70a42bf375c4e048fe69066a0d9b5e69bc2a79a/soupsieve-1.8-py2.py3-none-any.whl
> (88kB)
> >
> >      > Installing collected packages: soupsieve, beautifulsoup4
> >
> >      > Successfully installed beautifulsoup4-4.7.1 soupsieve-1.8
> >
> >      > =====================================
> >
> >      >
> >
> >      > progress: now a different error
> >
> >      >
> >
> >      > =====================================
> >
> >      > Could not load definitions from resource
> org/jacoco/ant/antlib.xml. It could not be found.
> >
> >      > ant -f C:\\x3d-code\\www.web3d.org <http://www.web3d.org>\\x3d\\stylesheets\\java\\src\\python\\pyjnius
> configuration
> >
> >      > configuration:
> >
> >      > create imported files: autoclass.py fieldtypes.py mapToMethod.py
> >
> >      > Traceback (most recent call last):
> >
> >      >     File "autoclass.py", line 50, in <module>
> >
> >      >       soup =
> BeautifulSoup(open("../../../../../../specifications/X3dUnifiedObjectModel-4.0.xml"),
> "xml")
> >
> >      >     File "C:\Program
> Files\Python37\lib\site-packages\bs4\__init__.py", line 196, in __init__
> >
> >      >       % ",".join(features))
> >
> >      > bs4.FeatureNotFound: Couldn't find a tree builder with the
> features you requested: xml. Do you need to install a parser library?
> >
> >      > Result: 1
> >
> >      > =====================================
> >
> >      >
> >
> >      > found some help:
> >
> >      > bs4.FeatureNotFound: Couldn't find a tree builder with the
> features you requested: lxml. Do you need to install a parser library?
> >
> >      >
> https://stackoverflow.com/questions/24398302/bs4-featurenotfound-couldnt-find-a-tree-builder-with-the-features-you-requeste
> >
> >      >
> >
> >      > followed initial guidance there for supporting:
> >
> >      >
> >
> >      > =====================================
> >
> >      > $ pip install lxml
> >
> >      > Collecting lxml
> >
> >      >     Using cached
> https://files.pythonhosted.org/packages/be/b9/d05cd1680537aa39d8f0546871a4e56d82a5fdc97ac4006c37076a94915a/lxml-4.3.2-cp37-cp37m-win_amd64.whl
> >
> >      > Installing collected packages: lxml
> >
> >      > Successfully installed lxml-4.3.2
> >
> >      > =====================================
> >
> >      >
> >
> >      > worked as administrator!  logged out, logged in as user,
> continued to work.  hooray at last.
> >
> >      >
> >
> >      > =====================================
> >
> >      > Could not load definitions from resource
> org/jacoco/ant/antlib.xml. It could not be found.
> >
> >      > ant -f C:\\x3d-code\\www.web3d.org <http://www.web3d.org>\\x3d\\stylesheets\\java\\src\\python\\pyjnius
> configuration
> >
> >      > configuration:
> >
> >      > create imported files: autoclass.py fieldtypes.py mapToMethod.py
> >
> >      > BUILD SUCCESSFUL (total time: 2 seconds)
> >
> >      > =====================================
> >
> >      >
> >
> >      > So, some suggestions seem to be in order.
> >
> >      >
> >
> >      > a. we should document prerequisites.
> >
> >      > b. perhaps add another target that performs these installs, along
> with diagnostics.
> >
> >      >
> >
> >      > So, I worked out Ant invocations of all of these pip installs and
> got them working.
> >
> >      >
> >
> >      > While integrating that block, at long last noted that you had
> most of this already in target install.dependencies - ouch!
> >
> >      >
> >
> >      > And so, renamed that target for proximity to
> configuration.prerequisites, and made it a dependency of the configuration
> target so that it is always run.
> >
> >      >
> >
> >      > =====================================
> >
> >      > localadmin at DESKTOP-2S09UKA /cygdrive/c/x3d-code/
> www.web3d.org/x3d/stylesheets/java/src/python/pyjnius <
> http://www.web3d.org/x3d/stylesheets/java/src/python/pyjnius>
> >
> >      > $ ant configuration.prerequisites
> >
> >      > Buildfile: C:\x3d-code\www.web3d.org <http://www.web3d.org
> >\x3d\stylesheets\java\src\python\pyjnius\build.xml
> >
> >      >     [taskdef] Could not load definitions from resource
> org/jacoco/ant/antlib.xml. It could not be found.
> >
> >      >
> >
> >      > configuration.prerequisites:
> >
> >      >        [echo] ensure needed libraries are installed (initial
> installs likely to require administrator login)
> >
> >      >        [echo] node.js and npm are required
> >
> >      >        [echo] https://nodejs.org/en
> >
> >      >        [echo] https://docs.npmjs.com/cli/install
> >
> >      >        [exec] audited 34 packages in 1s
> >
> >      >        [exec] found 0 vulnerabilities
> >
> >      >        [exec]
> >
> >      >        [echo] Pyjnius is a Python library for accessing Java
> classes.
> >
> >      >        [echo]
> https://pyjnius.readthedocs.io/en/latest/installation.html
> >
> >      >        [echo] Alert: use Pyjnius page to confirm JAVA_HOME and
> PATH requirements
> >
> >      >        [exec] Error: Could not create the Java Virtual Machine.
> >
> >      >        [exec] Error: A fatal exception has occurred. Program will
> exit.
> >
> >      >        [exec] Unrecognized option: --version
> >
> >      >        [exec] Result: 1
> >
> >      >        [exec] Python 3.7.2
> >
> >      >        [echo] Alert: note administrator permissions are likely
> required
> >
> >      >        [exec] Requirement already up-to-date: pip in c:\program
> files\python37\lib\site-packages (19.0.3)
> >
> >      >        [exec] Collecting setuptools
> >
> >      >        [exec]   Downloading
> https://files.pythonhosted.org/packages/d1/6a/4b2fcefd2ea0868810e92d519dacac1ddc64a2e53ba9e3422c3b62b378a6/setuptools-40.8.0-py2.py3-none-any.whl
> (575kB)
> >
> >      >        [exec] Installing collected packages: setuptools
> >
> >      >        [exec]   Found existing installation: setuptools 40.6.2
> >
> >      >        [exec]     Uninstalling setuptools-40.6.2:
> >
> >      >        [exec]       Successfully uninstalled setuptools-40.6.2
> >
> >      >        [exec] Successfully installed setuptools-40.8.0
> >
> >      >        [exec] Collecting cython
> >
> >      >        [exec]   Downloading
> https://files.pythonhosted.org/packages/14/48/43fd6c0b29450c57a4eff636384dd691bef05c49410edfeb2fe4e4e79ec2/Cython-0.29.6-cp37-cp37m-win_amd64.whl
> (1.7MB)
> >
> >      >        [exec] Installing collected packages: cython
> >
> >      >        [exec] Successfully installed cython-0.29.6
> >
> >      >        [exec] Collecting pyjnius
> >
> >      >        [exec]   Downloading
> https://files.pythonhosted.org/packages/b6/57/c90acf31322e6417f06c90410dbfcb149633a6006b7efbf99dfebe177c1f/pyjnius-1.2.0.tar.gz
> >
> >      >        [exec] Collecting six>=1.7.0 (from pyjnius)
> >
> >      >        [exec]   Using cached
> https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
> >
> >      >        [exec] Requirement already satisfied, skipping upgrade:
> cython in c:\program files\python37\lib\site-packages (from pyjnius)
> (0.29.6)
> >
> >      >        [exec] Installing collected packages: six, pyjnius
> >
> >      >        [exec]   Running setup.py install for pyjnius: started
> >
> >      >        [exec]     Running setup.py install for pyjnius: finished
> with status 'error'
> >
> >      >        [exec]     Complete output from command "C:\Program
> Files\Python37\python.exe" -u -c "import setuptools,
> tokenize;__file__='C:\\cygwin64\\tmp\\pip-install-bb5fdimw\\pyjnius\\setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> C:\cygwin64\tmp\pip-record-rm9cetjj\install-record.txt
> --single-version-externally-managed --compile:
> >
> >      >        [exec]     C:/Program Files/Java/jdk1.8.0_202
> >
> >      >        [exec]     WARNING: Not able to assign machine() = AMD64
> to a cpu value!
> >
> >      >        [exec]              Using cpu = 'i386' instead!
> >
> >      >        [exec]     JDK_HOME: C:/Program Files/Java/jdk1.8.0_202
> >
> >      >        [exec]
> >
> >      >        [exec]     JRE_HOME: C:/Program Files/Java/jdk1.8.0_202\jre
> >
> >      >        [exec]
> >
> >      >        [exec]     warning: [options] bootstrap class path not set
> in conjunction with -source 1.6
> >
> >      >        [exec]     1 warning
> >
> >      >        [exec]     running install
> >
> >      >        [exec]     running build
> >
> >      >        [exec]     running build_py
> >
> >      >        [exec]     creating build
> >
> >      >        [exec]     creating build\lib.win <http://lib.win
> >-amd64-3.7
> >
> >      >        [exec]     copying jnius_config.py -> build\lib.win <
> http://lib.win>-amd64-3.7
> >
> >      >        [exec]     creating build\lib.win <http://lib.win
> >-amd64-3.7\jnius
> >
> >      >        [exec]     copying jnius\reflect.py -> build\lib.win <
> http://lib.win>-amd64-3.7\jnius
> >
> >      >        [exec]     copying jnius\signatures.py -> build\lib.win <
> http://lib.win>-amd64-3.7\jnius
> >
> >      >        [exec]     copying jnius\__init__.py -> build\lib.win <
> http://lib.win>-amd64-3.7\jnius
> >
> >      >        [exec]     creating build\lib.win <http://lib.win
> >-amd64-3.7\jnius\src
> >
> >      >        [exec]     creating build\lib.win <http://lib.win
> >-amd64-3.7\jnius\src\org
> >
> >      >        [exec]     creating build\lib.win <http://lib.win
> >-amd64-3.7\jnius\src\org\jnius
> >
> >      >        [exec]     copying
> jnius\src\org\jnius\NativeInvocationHandler.class -> build\lib.win <
> http://lib.win>-amd64-3.7\jnius\src\org\jnius
> >
> >      >        [exec]     copying
> jnius\src\org\jnius\NativeInvocationHandler.java -> build\lib.win <
> http://lib.win>-amd64-3.7\jnius\src\org\jnius
> >
> >      >        [exec]     running build_ext
> >
> >      >        [exec]     cythoning jnius\jnius.pyx to jnius\jnius.c
> >
> >      >        [exec]     C:\Program
> Files\Python37\lib\site-packages\Cython\Compiler\Main.py:367:
> FutureWarning: Cython directive 'language_level' not set, using 2 for now
> (Py2). This will change in a later release! File:
> C:\cygwin64\tmp\pip-install-bb5fdimw\pyjnius\jnius\jnius.pyx
> >
> >      >        [exec]       tree = Parsing.p_module(s, pxd,
> full_module_name)
> >
> >      >        [exec]     building 'jnius' extension
> >
> >      >        [exec]     error: Microsoft Visual C++ 14.0 is required.
> Get it with "Microsoft Visual C++ Build Tools":
> https://visualstudio.microsoft.com/downloads/
> >
> >      >        [exec]
> >
> >      >        [exec]     ----------------------------------------
> >
> >      >        [exec] Command ""C:\Program Files\Python37\python.exe" -u
> -c "import setuptools,
> tokenize;__file__='C:\\cygwin64\\tmp\\pip-install-bb5fdimw\\pyjnius\\setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> C:\cygwin64\tmp\pip-record-rm9cetjj\install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in
> C:\cygwin64\tmp\pip-install-bb5fdimw\pyjnius\
> >
> >      >        [exec] Result: 1
> >
> >      >        [echo] bs4 Beautiful Soup is a Python library for pulling
> data out of HTML and XML files
> >
> >      >        [echo]
> https://www.crummy.com/software/BeautifulSoup/bs4/doc
> >
> >      >        [exec] Collecting bs4
> >
> >      >        [exec]   Using cached
> https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz
> >
> >      >        [exec] Requirement already satisfied, skipping upgrade:
> beautifulsoup4 in c:\program files\python37\lib\site-packages (from bs4)
> (4.7.1)
> >
> >      >        [exec] Requirement already satisfied, skipping upgrade:
> soupsieve>=1.2 in c:\program files\python37\lib\site-packages (from
> beautifulsoup4->bs4) (1.8)
> >
> >      >        [exec] Installing collected packages: bs4
> >
> >      >        [exec]   Running setup.py install for bs4: started
> >
> >      >        [exec]     Running setup.py install for bs4: finished with
> status 'done'
> >
> >      >        [exec] Successfully installed bs4-0.0.1
> >
> >      >        [echo] lxml - XML and HTML with Python https://lxml.de
> >
> >      >        [exec] Requirement already up-to-date: lxml in c:\program
> files\python37\lib\site-packages (4.3.2)
> >
> >      >
> >
> >      > BUILD SUCCESSFUL
> >
> >      > Total time: 22 seconds
> >
> >      > =====================================
> >
> >      >
> >
> >      > (Finally) a nice feature:  don't need admin permission if
> packages are up-to-date, and the output diagnostics provide confirmation.
> >
> >      >
> >
> >      > c. Still have problems with:
> >
> >      >        "[exec]     error: Microsoft Visual C++ 14.0 is required.
> Get it with "Microsoft Visual C++ Build Tools":
> https://visualstudio.microsoft.com/downloads/"
> >
> >      >
> >
> >      > Is that really needed?
> >
> >      >
> >
> >      > d. Still have problems with jacocoant.jar - can't seem to find it
> online   8(
> >
> >      >
> >
> >      > Looked all around the jacoco pages without success, wondering how
> to get it (or build it).
> >
> >      >
> >
> >      > Kept searching elsewhere and found it in the Maven mvnrepository:
> >
> >      >
> >
> >      > https://mvnrepository.com/artifact/org.jacoco/org.jacoco.ant/
> >
> >      >
> https://mvnrepository.com/artifact/org.jacoco/org.jacoco.ant/0.8.3
> >
> >      >
> http://central.maven.org/maven2/org/jacoco/org.jacoco.ant/0.8.3/org.jacoco.ant-0.8.3.jar
> >
> >      >
> >
> >      > Then put that in the project path with other .jars, i.e.
> >
> >      >             C:\x3d-code\www.web3d.org <http://www.web3d.org
> >\x3d\stylesheets\java\lib
> >
> >      >
> >
> >      > Then updated the build.xml file:
> >
> >      >
> >
> >      > <taskdef uri="antlib:org.jacoco.ant"
> resource="org/jacoco/ant/antlib.xml">
> >
> >      >       <classpath path="../../../lib/org.jacoco.ant-0.8.3.jar"/>
> >
> >      >       <!-- <classpath
> path="~/Downloads/jacoco-0.8.3/lib/jacocoant.jar"/>-->
> >
> >      > </taskdef>
> >
> >      >
> >
> >      > However there is some kind of versionitis problem between your
> code and the 0.8.3 .jar, the following errors result:
> >
> >      > C:\x3d-code\www.web3d.org <http://www.web3d.org>\x3d\stylesheets\java\src\python\pyjnius\build.xml:87:
> The following error occurred while executing this line:
> >
> >      > jar:file:/C:/x3d-code/
> www.web3d.org/x3d/stylesheets/java/lib/jacocoant.jar!/org/jacoco/ant/antlib.xml:17:
> <
> http://www.web3d.org/x3d/stylesheets/java/lib/jacocoant.jar!/org/jacoco/ant/antlib.xml:17:>
> taskdef A class needed by class org.jacoco.ant.ReportTask cannot be found:
> org/jacoco/core/analysis/ICoverageNode
> >
> >      >    using the classloader AntClassLoader[C:\x3d-code\www.web3d.org
> <http://www.web3d.org>\x3d\stylesheets\java\lib\jacocoant.jar]
> >
> >      >
> >
> >      > =====================================
> >
> >      >
> >
> >      > On 2/17/2019 4:10 PM, John Carlson wrote:
> >
> >      >> I am ready to talk about PythonSerializer.js or
> PythonPipeliningSerializer.js, but not X3dToPython.xslt.  You will probably
> have to take the lead on that.  If we’re just discussing the Python SAI, I
> have 2 solutions for that, both probably incomplete.   But I haven’t
> recently run the pipelined programs under visual inspection to see if my
> last change fixed it or not.  So we can catch up together.
> >
> >      >>
> >
> >      >> 2/19 at 2pm PM is fine with me.
> >
> >      >>
> >
> >      >> My friends have had the best luck with PyCharm.  I suspect that
> Anaconda will work with PyCharm, but let’s not try it as long as you have a
> way of editing a python program.  I will try to set up a jupyter here:
> http://jupyter.goexchange.de/hub/user/john/ contact me over phone for
> password, but I think we may need admin privileges to install pyjnius there
> (will have to talk to alex). It would be good to see any installed programs
> like R export X3DOM or X_ITE.
> >
> >      >>
> >
> >      >> I have removed x3d-public from the list to maintain some measure
> of confidentiality for alex’s machines.
> >
> >      >>
> >
> >      >> I have also incompletely added JACOCO to build.xml (needs work).
> >
> >      >>
> >
> >      >> John
> >
> >      >>
> >
> >      >> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> >
> >      >>
> >
> >      >> *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> >
> >      >> *Sent: *Sunday, February 17, 2019 11:24 AM
> >
> >      >> *To: *John Carlson <mailto:yottzumm at gmail.com>
> >
> >      >> *Cc: *X3D Graphics public mailing list <mailto:
> x3d-public at web3d.org>
> >
> >      >> *Subject: *X3D python again
> >
> >      >>
> >
> >      >> hi John.
> >
> >      >>
> >
> >      >> Even after recent retries, never did get python 3.7.2 stock
> package working properly on windows 10.  Not sure why, suspect interference
> from other python-related packages/paths.
> >
> >      >>
> >
> >      >> https://www.python.com
> >
> >      >>
> >
> >      >> after a large number of hours spent in python-install heck, i
> finally have anaconda package with python v3.1 mostly working.
> >
> >      >>
> >
> >      >> https://www.anaconda.com
> >
> >      >>
> >
> >      >> their installer fails if there is any extraneous python anywhere
> in path - got past that by uninstalling, manual removals, and manual
> editing of environment variables to get everything back to bare metal.
> another major time-waste was that anaconda also appears to succeed but
> actually fails if installed as localuser (somewhat similar failure to
> install of stock python) and so have installed it as admin, with
> permissions for all users, for best supervisory ability.
> >
> >      >>
> >
> >      >> launching the anaconda navigator and anaconda spyder
> environments still fails for me, but otherwise things seem to be working.
> tracked down idle and exposed its batch file.  of note is that anaconda
> includes R and also Jupyter notebook.  these are all important target
> environments for X3D.
> >
> >      >>
> >
> >      >> will keep working, hoping to set up a meeting next week after
> long weekend.  given that i've finally got something going, am ready to
> resume "playing catch up" to your PYJNIUS mappings for X3DJSAIL.
> >
> >      >>
> >
> >      >> as part of resynch, let's start out with documenting X3dToPython
> similar to how we proceeded with
> >
> >      >>
> >
> >      >>                   X3D JSON Encoding
> >
> >      >>
> >
> >      >> http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding
> >
> >      >>
> >
> >      >>                   X3D to JSON Stylesheet Converter
> >
> >      >>
> >
> >      >> http://www.web3d.org/x3d/stylesheets/X3dToJson.html
> >
> >      >>
> >
> >      >> Might Tuesday 1400-1500 pacific (or later) work for you?  Web3D
> Conference line, in case someone wants to join the journey with us.
> >
> >      >>
> >
> >      >> Looking forward to regaining progress together, again thanks for
> your patience.
> >
> >      >>
> >
> >      >> all the best, Don
> >
> >      >>
> >
> >      >> --
> >
> >      >>
> >
> >      >> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu <mailto:brutzman at nps.edu>
> >
> >      >>
> >
> >      >> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
> >
> >      >>
> >
> >      >> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
> >
> >      >>
> >
> >      >
> >
> >      >
> >
> >      > all the best, Don
> >
> >      >
> >
> >     all the best, Don
> >
> >     --
> >
> >     Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu <mailto:brutzman at nps.edu>
> >
> >     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
> >
> >     X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
> >
>
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190325/cb67e022/attachment-0001.html>


More information about the x3d-public mailing list