[x3d-public] x3d.py package: Some feedback and suggestion for improvement; tuples and lists; updated x3d.py

John Carlson yottzumm at gmail.com
Sat Mar 5 22:46:05 PST 2022


I did a bit of messing around with my virtual environment and versions of
x3d.py. I noticed with version 4.0.51, there was an x3d folder in
site-packages with the code in it.  So somehow, in the 4.0.60 releases, the
x3d folder (the code) was left out?

Hope this helps!

John

On Sun, Mar 6, 2022 at 12:16 AM John Carlson <yottzumm at gmail.com> wrote:

> I tried adding necessary files to my virtual environment without luck.
> Here also is my system installed x3d:
>
> john at DESKTOP-8OPL3IE MINGW64
> /c/Python310/Lib/site-packages/x3d-4.0.60.dist-info
> $ ls
> INSTALLER  LICENSE  license.html  license.txt  METADATA  RECORD  REQUESTED
>  top_level.txt  WHEEL
>
> Again, no code???  Good luck!  Don't forget to deploy code to package
> distribution.  Maybe there's something with your network which is
> preventing files from upload?  Are you uploading the files from a different
> machine or network?
>
> John
>
> On Sat, Mar 5, 2022 at 11:54 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> I haven't made much progress, but when installing x3d.py in a virtual
>> environment:
>>
>> $ py -m venv venv
>>
>> $ source venv/Scripts/activate
>>
>> $ pip install x3d
>>
>> $ python -m pip install --upgrade pip
>>
>> $ pip3 install --upgrade x3d
>> Requirement already satisfied: x3d in c:\x3d-code\www.web3d.org\x3d\stylesheets\python\venv\lib\site-packages
>> (4.0.60)
>>
>> $ cd venv/Lib/site-packages/x3d-4.0.60.dist-info/
>>
>> $ ls
>> INSTALLER  LICENSE  license.html  license.txt  METADATA  RECORD
>>  REQUESTED  top_level.txt  WHEEL
>>
>> **** no code ???  ***
>>
>> I'll look at the way to deploy a package and see if I see anything, but I
>> have no experience.
>>
>> John
>>
>> On Sat, Mar 5, 2022 at 8:09 PM Brutzman, Donald (Don) (CIV) <
>> brutzman at nps.edu> wrote:
>>
>>> 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.
>>>
>>>
>>>
>>> Does latest version work for you? Presumably you are getting the same
>>> problem… test reports are helpful.
>>>
>>>
>>>
>>> Perhaps my local installation is incorrect… am just using stock latest
>>> python installer from python.org.  I will do a complete
>>> uninstall/reinstall of python 3.10.latest.
>>>
>>>
>>>
>>> Our goal is simplicity.  Still trying to find right incantation in our
>>> __init__.py for PyPi.
>>>
>>>
>>>
>>> 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 https://
>>> faculty.nps.edu/brutzman
>>>
>>>
>>>
>>> *From:* Hans Moritz Guenther <hgunther at mit.edu>
>>> *Sent:* Friday, March 4, 2022 11:17 AM
>>> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>;
>>> vmarchetti at kshell.com; X3D-Public <x3d-public at web3d.org>
>>> *Cc:* John Carlson <yottzumm at gmail.com>; Peitso, Loren (CIV) <
>>> lepeitso at nps.edu>
>>> *Subject:* Re: [x3d-public] x3d.py package: Some feedback and
>>> suggestion for improvement; tuples and lists; updated x3d.py
>>>
>>>
>>>
>>>
>>>
>>> On 3/1/22 10:31 PM, Brutzman, Donald (Don) (CIV) wrote:
>>>
>>> 5.   Bad news, still no joy.  Following “pip install x3d” and hiding
>>> PYTHONPATH, the PyPi version installed via pip still fails, now saying:
>>>
>>>
>>>
>>> IT160907-UWALPP+brutzman at IT160907-UWALPP /cygdrive/c/x3d-code/
>>> www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives
>>>
>>> $ python BoxExample.py
>>>
>>> Traceback (most recent call last):
>>>
>>>   File "C:\x3d-code\
>>> www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter02GeometryPrimitives\BoxExample.py
>>> <http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives/BoxExample.py>",
>>> line 23, in <module>
>>>
>>>     import x3d
>>>
>>> ModuleNotFoundError: No module named 'x3d'
>>>
>>>
>>>
>>> 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.
>>>
>>> > pip show x3d
>>>
>>> (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.
>>>
>>> Typically, they are in the same location:
>>>
>>>
>>> (base) MoritzAirRoseGold ~> which pip
>>> /Users/guenther/mambaforge/bin/pip
>>> (base) MoritzAirRoseGold ~> which python
>>> /Users/guenther/mambaforge/bin/python
>>>
>>> In that case, pip will install to a directory that python looks into
>>> when using "import".
>>>
>>> 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:
>>>
>>> /my/dir/x3d
>>>
>>> /my/dir/otherpackage1
>>>
>>> /my/dir/otherpacakge2
>>>
>>> then PYTHONPATH=/my/dir
>>>
>>> not "/my/dir/x3d" (because that way python would look for
>>> /my/dir/x3d/x3d/__init__.py, so one level of x3d too many).
>>>
>>> Moritz
>>>
>>> --
>>>
>>> Hans Moritz Günther
>>>
>>> Massachusetts Institute of Technology
>>>
>>> Kavli Institute for Astrophysics and Space Research
>>>
>>> 77 Massachusetts Avenue
>>>
>>> NE83-569
>>>
>>> Cambridge, MA 02139
>>>
>>> hgunther at mit.edu
>>>
>>> https://space.mit.edu/home/guenther/ <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>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220306/f42f1afe/attachment-0001.html>


More information about the x3d-public mailing list