Installation¶
In order to install pymadcad, you need a version of Python >=3.8
From PyPI¶
pip install pymadcad
You can also select one or more optional dependencies:
pip install pymadcad[stl,ply,obj]
This installation may require build-dependencies, so please refer to source dependencies below
Optional dependencies¶
There is some optional dependencies you can choose to install by yourself to enable some features of pymadcad.
- plyfile to read/write
.plyfiles - stl-numpy to read/write
.stlfiles - pywavefront to read
.objfiles
From source¶
Build dependencies¶
-
Debian-based distributions
apt install gcc binutils python3-dev -
Windows distributions
You will need Visual Studio (licensed) or MSVC redistribuable (free to download) installed
Module dependencies¶
Make sure you installed the dependencies:
pip install moderngl pyglm pillow numpy scipy pyyaml arrex
You still need the PyQt5 library. As there is many possible sources, you have to install it manually so you can use the version/source you prefer. Choose one of the following:
-
Qt from PyPI
pip install PyQt5 -
Qt from the Linux repositories
sudo apt install python3-pyqt5 python3-pyqt5.qtopengl
Compile the module¶
You will need an archive of the source directory. Extract it somewhere then type the following commands in the extracted directory.
python setup.py build_ext --inplace
The source directory can now be imported.