Installation on Ubuntu 22.04, how to run the tool?

Hello Guys,
I am trying to install the tool on ubuntu 22.04, but the installation file is not clear. I have Anaconda installed on my PC. I installed the tool using pip install devsim, but now is not clear how can i run the interface of the tool. From chapter 9 is not clear where do i need to run this command.
In a python IDE? In there a better documentation that provide step by step the installation and how to run the interface and a first simulation? I already spent two days without any succes…

Hi @diabloi,

Those instructions in chapter 9 need to be updated with respect to setting the PYTHONPATH. A slightly better instruction is here:

Using pip in the anaconda environment, the examples should be in the $CONDA_PREFIX/devsim_data directory. If you are at a windows anaconda command prompt, you can type:

cd %CONDA_PREFIX%\devsim_data

where you will see the examples and testing directories. These examples are meant to be run using a python interpreter:

cd examples/diode

There are others in this forum who have created notebooks, but I am not too experienced with that interface. @simbilod has created a notebook in the examples/plotting directory, which requires pyvista.

The source files for the pdf documentation are at and is also published in html form at The file has more recent changes to the software, which have not been incorporated yet.

1 Like

Hi diabloi, Juan did a great job packaging DEVSIM into pypi. It greatly simplifies installation and allows you to build DEVSIM into automated workflows easily!

The way I would recommend to go about this is by following the general way to run any conda or pip package. All of the below is done through your terminal command line.

(1) Use Anaconda for managing Python packages/environments (you seem to have done this already). It`s a little more general than regular virtual environments.

(2) Create a separate Anaconda environment to hold DEVSIM+dependencies (environment_name can be whatever you want). It`s good practice to have separate environments for your different projects to minimize dependency conflicts.

conda create -n environment_name

(3) Activate the environment.Your terminal should show the environment name on the prompt after this.

conda activate environment_name

(4) If you plan to use pip install, and not just conda installs, (which you are), make sure your conda environment uses its own pip:

conda install pip

(5) Then you can install whatever you want, for instance

pip install devsim

and when running Python scripts, the lines “import devsim” should resolve without error.

(6) If you want to run the examples, I find the easiest way is to clone the Github repository:

git clone GitHub - devsim/devsim: TCAD Semiconductor Device Simulator

(7) You should just be able to navigate to the examples folder and run the examples as:


(8) Optional: you can use an IDE or Jupyter Notebooks to modify and/or run the code. I like VSCode.


Thanks for the help, I will try as soon as possible!

Hi, I tried your procedure and now it is fine. Many thanks,
Now appear the second question. I am able to run in VisualCode the example “”, I think the code is run, but I was expecting something like a graph, but it does not appear.
I am worried about the two last lines…
“QSocketNotifier: Can only be used with threads started with QThread
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.”
Any suggestion?

Hi @diabloi

If you uncommented the plotting script at the end, it is set to create an encapsulated post script to a file. You can change the script to display an image to the screen instead. The matplotlib documentation has examples, and it involves using the show command.

Thanks, I get the plot… the last two lines should be “print(ymin) , print(ymax)” but without parenthesis I get an error.
I am new to this tool, I used in the university the “Comsol Multiphysics”, with the devsim can I get something similar for an NMOS? the version 2D is fine

Hi @diabloi

Please review some of the posts in this forum. The MOS in the examples/mobility directory are not very good, but there is a similar one with mesh refinement to improve the quality of results:

There is also a 3D example I used in publication here: