Installation#
The rust_nurbs library can be installed any of the following methods:
pip install rust-nurbs
git clone https://github.com/mlau154/rust_nurbs.git
cd rust_nurbs
pip install .[build]
git clone https://github.com/mlau154/rust_nurbs.git
cd rust_nurbs
pip install .[dev]
Important
If you do not want rust-nurbs installed in your default system Python, make sure to first activate a virtual environment!
You may find that the Latest and Dev methods of installing rust_nurbs fail because Rust/Cargo could not be found on your system. Rust must be installed properly on your machine for these versions of the pip install command to pass. See below to
see how to ensure this in Windows or Linux (macOS likely has similar instructions to the Linux case):
Install the Visual Studio C++ Build toolchain.
Add the VS C++ toolchain to your system path environment variable (if installed at the default location, the path to the binaries will usually look something like
C:\Program Files (x86)\Microsoft Visual Studio\<release-year>\BuildTools\MSBuild\Current\BinorC:\Program Files\Microsoft Visual Studio\<release-year>\BuildTools\MSBuild\Current\Binif using the 64-bit version)Install Rust from the Rust installation page
Add the Rust toolchain binaries to your system path environment variable (if installed at the default location, the path to the binaries will usually something like
C:\Users\<user-name>\.cargo\bin)
Install the MSYS2 toolchain.
Add the MSYS2 toolchain to your system path environment variable (if installed at the default location, the path to the binaries will usually look something like
C:\msys64\mingw64\bin)Install Rust from the Rust installation page, using the custom installation method and switching to the GNU version of Rust if desired. Alternatively, the default installation can be used and the GNU version can be set as the default in the last step.
Add the Rust toolchain binaries to your system path environment variable (if installed at the default location, the path to the binaries will usually look something like
C:\Users\<user-name>\.cargo\bin)Now, run the following commands to switch to the GNU version of Rust if you did not already switch in Step 3:
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
Note
You may need to restart your terminal before running the previous commands.
Install Rust from the Rust installation page. At the time of writing, the command was
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install Rust from the Rust installation page
After these steps are completed correctly, the pip install command should execute successfully.