Replies: 2 comments 10 replies
-
some comments:
Depends where your python environment is located that you installed Ryven in. For using PythonOCC, however, this path seems not correct, as it points to a Ryven installation of your system-wide Python3.9, but you should use PythonOCC in an Anaconda environment, which has its own Python path.
The link in the README directs to https://anaconda.org/conda-forge/pythonocc-core which shows the command to install it in anaconda. If your anaconda environment is working and you installed pythonocc-core in it, you should see it in the list by running In case you didn't use Anaconda previously check out how to set it up on your system, create a new conda environment, install all dependencies listed in the README of this repo into this environment, clone the repository and start ryven from within the anaconda environment. |
Beta Was this translation helpful? Give feedback.
-
If you're not familiar with python, anaconda and so on, on Windows OS an easy way to proceed is to :
On Windows your environment files will be here :
|
Beta Was this translation helpful? Give feedback.
-
Okay, here are some notes/questions on this (Note that the original attempt was to install into Ubuntu, but later switched to Windows) and what I hope are workable step-by-step instructions:
First, it is important that one have a clean/consistent Python environment --- uninstall any environments which are not being used. If need be, remove all and start fresh.
Second, it seems necessary to place PythonOCC in a specific environment --- attempts to install it globally and then use it w/o specifying an environment were unsuccessful. (This installation technique is noted on the github page for PythonOCC). Once one has created and activated the environment (named pyoccenv in the instructions below) each successive step must be done w/ that environment active.
Third, note that several different install methodologies/commands are used because this tool follows the Unix philosophy of using the appropriate small tool for any given task.
Lastly, note that the tool has several layers each of which has to be set in place before the one on top of it may be made use of, and that as noted above, a critical glue holding things together is the named environment which must be active once it is created.
used a download of Python from python.org and installed it per: https://docs.python.org/3/using/windows.html
Install miniconda w/ the defaults: https://docs.conda.io/en/latest/miniconda.html
install PythonOCC (note that using python=3.10 below did not work):
conda create --name=pyoccenv python=3.9
conda activate pyoccenv
conda install -c conda-forge pythonocc-core=7.5.1 occt=7.5.1
install PythonOCC-utils: Download .zip archive of: https://github.com/tpaviot/pythonocc-utils (or git clone) and unzip to:
C:\Users<YOUR USER DIRECTORY>\miniconda3\envs\pyoccenv
Then, cd into that directory:
install Ryven:
pip install ryven
download and unzip: https://github.com/Tanneguydv/Pythonocc-nodes-for-Ryven/archive/refs/heads/main.zip somewhere convenient
also download any of the demo .json files which are of interest
At this point, it should work to launch ryven when the pyoccenv is active.
If you have a saved .json file which you wish to load, click on "load example" when you first launch Ryven.
When launching Ryven (or loading an example) and making a new project File | Import Example Nodes --- this should open in ~/.local/lib/python3.9/site-packages/ryven/example_nodes --- go into the std directory and select nodes.py there --- it will also be necessary to load the nodes.py file for PythonOCC which is in the unzipped copy of Pythonocc-nodes-for-Ryven:
Notes:
The program Ryven doesn't warn about unsaved changes when you close it.
When you save a project the .json file extension isn't included automatically at the end of the filename --- add manually to open projects (this will be fixed in a future version).
It seems to be necessary to quit and then restart in order to load a new project.
Anyway success!
Beta Was this translation helpful? Give feedback.
All reactions