Installation#
The nextnanopy Python package can be installed on Linux, macOS and Windows. It requires Python 3.10 or later, the versions we actively test against.
A valid nextnano license is not required for the general use of nextnanopy — only if you want to execute input files (run simulations) via Python. See Set up the configuration.
Note
Installing into your plain, system-wide Python works fine — if you are just
getting started, you can run the pip install commands below as they are.
That said, it is good practice to install packages into an isolated virtual
environment so that each project keeps its own set of dependencies. You can
create one with the built-in
venv module or with a
distribution such as conda; activate it first,
then run the pip install commands inside it. If an install fails with a
permission denied error, either install into a per-user Python or virtual
environment, or re-run the command in a terminal with administrator rights.
nextnanopy is a plain Python library, so any editor works. Common choices are VS Code, JupyterLab (good for the example notebooks) and Spyder; none of them are required.
Install the package#
Pick the way you want to install nextnanopy — the latest release is the right choice unless you intend to edit the library itself.
Run the following in your Python environment of choice:
pip install nextnanopy
To upgrade to the latest version later:
pip install --upgrade nextnanopy
Installing from source keeps the templates/ and docs/ examples
locally and lets you edit the library and contribute changes back.
nextnanopy is an open repository on
GitHub —
contributions are very welcome!
Clone the repository into a directory of your choice, then install it in editable mode:
git clone https://github.com/nextnano-GmbH/nextnanopy.git
cd nextnanopy
pip install -e .
To upgrade later, pull the latest changes from inside the folder:
git pull
Optional features#
Some features rely on extra packages that are not installed by default. Install them via the corresponding extras:
pip install "nextnanopy[plot]" # plotting helpers (DataFile.plot, styles)
pip install "nextnanopy[gds]" # import shapes from GDS files
pip install "nextnanopy[post]" # post-processing (CV curves, minimization)
pip install "nextnanopy[all]" # everything above
The same extras work with the editable install, e.g. pip install -e ".[all]".
The required packages are installed automatically:
The extras pull in additional packages:
Matplotlib and Cycler — visualize data (
plot)gdspy and Shapely — import and manipulate polygons from GDS files (
gds)SciPy — post-processing (
post)