-
-
Notifications
You must be signed in to change notification settings - Fork 12
Dependency Installation
Python dependencies are required for most functions of NijiGPen. The following table shows the add-on operators which require packages:
Operator | Pyclipper | triangle | SciPy & SkImage |
---|---|---|---|
Polygon Boolean | |||
Polygon Offset | |||
Line Fit | |||
Smart Fill | |||
Mesh Generation |
|
||
Line Art Import | |||
Color Image Import |
* Without triangle
, some options of the "Delaunay Triangulation" mesh style will be invalid. The "Grid" mesh style is not affected.
** No packages are required for the GIMP/Adobe format support (brush import, PSD rendering and palette paste).
To install Python packages, the most straightforward way is the dependency manager in the add-on setting of the Preferences panel.
Click "Refresh" to check if packages are installed, and click "Install" button for those missing (Internet connection is required).
If the dependencies cannot be installed, there might be multiple reasons. Unfortunately, the add-on is not capable of solving all problems automatically. Please refer to the following sections for possible solutions.
Depending on your operating system and the way Blender is installed, additional steps may be required.
- If Blender is installed through Microsoft Store, the dependencies may not be installed properly. It is NOT recommended to use this add-on with Blender from Microsoft Store.
- If Blender is installed in a system folder (e.g.,
C:\Program Files\Blender Foundation\
), you may need to run Blender as administrator to ensure the dependencies installed correctly.- If earlier you attempted to install dependencies without administrator permission and failed, it is recommended to remove all dependencies first (also as administrator) and then install them again.
- Devices with Apple silicon (M1/M2) do not have the
triangle
package available. The other two packages can still be installed. - Due to the lack of test equipment, the system requirements of devices with Apple silicon are still not totally clear. A discussion thread is created for related issues.
During the installation process, only limited information can be shown in the Blender's main window. However, you can find more information in the Blender console or terminal, which may indicate the issues happening during the installation. For example:
- If the installation is stuck for a long time without any output logs, there might be an Internet connection issue. Please check your network configuration, such as the VPN setting.
- If there are messages such as "normal site-packages is not writable", the administrator permission is required. Please refer to the last section.
Such logs are available in different ways, depending on your operating system.
The installation log is shown in the Blender console, which can be started in the menu by clicking [Window] - [Toggle System Console].
The installation log is available only when Blender is started from a terminal. To do that, please refer to https://docs.blender.org/manual/en/latest/advanced/command_line/launch/macos.html.
Please refer to https://docs.blender.org/manual/en/latest/advanced/command_line/launch/linux.html.
Alternatively, the dependencies can be installed by typing commands manually.
Open either Command Prompt or PowerShell to type commands. Run them as administrator when necessary.
- Enter the Python folder of Blender. The directory looks like
(Your Blender Installation Directory)\3.x\python\bin
. For example, if you installed Blender 3.3 in the default folder, then use the following command:cd "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\bin"
. - Enable the
pip
module of Python:.\python.exe -m ensurepip --upgrade
- Install packages:
.\python.exe -m pip install pyclipper triangle scikit-image
Open Terminal and find the Blender directory as follows (using Blender 3.3 as an example):
cd /Applications/Blender.app/Contents/Resources/3.3/python/bin/
./python3.10 -m ensurepip
./python3.10 -m pip install pyclipper triangle scikit-image
If encountering problems during the pip
package installation, you can try to use the following arguments: --no-cache-dir
, --force-reinstall
and --only-binary
.
For example, the command to install triangle
can be:
./python3.10 -m pip install --no-cache-dir --force-reinstall --only-binary=triangle triangle