I just tried it on my computer and it worked just fine. Here is what I did step by step:
I started Anaconda
I activated a python 3.9 environment that I know does not have topologicpy (conda activate py39). Please note that topologicpy is compatible with python 3.7, 3.8, 3.9, and 3.10.
I started python in that environment
I tried import topologicpy. That failed as expected with ModuleNotFound as topologicpy was not installed
I quit python and went back to the command prompt still in the activated conda environment
I issued a pip install topologicpy (it installed version 0.0.25)
After installation was complete, I relaunched python
I issued the command from topologicpy.Vertex import Vertex. That worked.
I created a topologic vertex and printed its coordinates and that worked as well.
Just a hunch: When these things have happened in the past, there usually is a different installation of OCCT with a different version than the one topologic uses and that is causing a problem.
Thank @topologic , please see the screen recording reproducing a strange behavior that "sometimes" makes importing fail
I'm working on a clean windows 11 installation on a VM, just with one python 3.9.16 running inside the conda enviroment. Topologicpy is 0.025 and ifcopenshell is 0.7.0
Hi @topologic , I make it work in both py3.9 and 3.10.
BUT, the "importing order" problem shown in the video start to happen when a new module is installed in the environment. The module is pythonocc-core. This happens with both python 3.9 and 3.10
@topologic said:
I think I got a solution. What version of python are you using? For testing, can you use 3.10? I can send you a test version of topologicpy
I would be more than happy to test that "new" version of topologicpy to see if it can "stay happy" with pythonocc-core
Don't sound so surprised! ;-) Basically, the solution is in something called 'mangle' After you build the library, you run this algorithm to mangle the names of the DLLs and it makes sure topologic continues to point to them. This way, topologic no longer shares the same DLL names with anything else that uses occt.
T
by topologic on 15 Feb 2023, edited 15 Feb 2023#
A new version of topologicpy (0.1.1) has been released to pypi.org. You can install with pip install topologicpy --upgrade. This version is compatible with OCCT 7.7.0 for Windows and Linux and with python 3.8, 3.9, 3.10, and 3.11
@leceta topologicpy version 0.1.4 and updated documentation has been released. It has awesome new features including Vertex.IsOnSameSide and OBJ import/export