[CanTp] Vehicle Diagnostic Communication Part 16 [Simulation 4]

[CanTp] Vehicle Diagnostic Communication Part 16 [Simulation 4] 車両診断通信
[CanTp] Vehicle Diagnostic Communication Part 16 [Simulation 4]

Click here for back issues.


Let’s simulate ISO-TP. series.
In this issue, we will work up to the Python setup.

Python on Windows?

Now that we are ready to control and monitor against the Virtual CAN Bus, it is time to try to control CAN with Python.

We will do this in a Windows environment, although this is already determined at the stage where we are using the Virtual CAN Bus.
Therefore, Python will also be used for the Windows environment.


Specifically, Anaconda is used.

Anaconda is a distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment. The distribution includes data-science packages suitable for Windows, Linux, and macOS. It is developed and maintained by Anaconda, Inc., which was founded by Peter Wang and Travis Oliphant in 2012.[8] As an Anaconda, Inc. product, it is also known as Anaconda Distribution or Anaconda Individual Edition, while other products from the company are Anaconda Team Edition and Anaconda Enterprise Edition, both of which are not free.


An alternative to Anaconda is the official Python Windows version.

On top of that, the reason for using Anaconda is … nothing in particular.
I don’t use Anaconda’s “conda” function for virtual environment management, so the official Python version would probably be fine.
I don’t care which one I use, but I’ll use Anaconda anyway.

Anaconda installation

Installing Anaconda is not that difficult.
Just download and install the Windows version from the following link.

However, please note that the installer is divided into 32-bit and 64-bit versions.

Anaconda operation check.

Now that Anaconda is installed, we need to make sure it works.
I think Anaconda Prompt is on the desktop, so I launch it.

Type “python” and press the Enter key.
A python prompt will start up, so type print(‘Hello, world!’) after that.
If you get the following result, it is OK.

(base) C:\Users\[User anme]>python
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('Hello, world!')
Hello, world!

I will do an explanation of python-can in the next issue.


  • Finally, we get into Python.
  • I’ll use Anaconda, but you can use the official Python for Windows.
  • You’d better make sure each one works! (I keep telling myself that…)

Click here for back issues.