0

Last year, I made a program using the PyModbusTCP module on a raspberry Pi. Now I want to try my programs again on a windows pc but I can't seem to get my installations correct.

Here is some info: project has a venv folder and a main.py next to it. I am not sure if the main.py has to be in the venv folder or not. PyModbusTCP has been installed using git cmd with the command "pip3 install pyModbusTCP" and gives me a message "requirement already satisfied..."

Message in console after using a basic program provided by the pymodbustcp dev:

C:\Users\SESA681397\PycharmProjects\pythonProject\venv\Scripts\python.exe C:\Users\SESA681397\PycharmProjects\pythonProject\test.py 
Traceback (most recent call last):
  File "C:\Users\SESA681397\PycharmProjects\pythonProject\test.py", line 1, in <module>
    from pyModbusTCP.client import ModbusClient
ModuleNotFoundError: No module named 'pyModbusTCP'

Thank you for your time reading this, it is probably a stupid problem but i don't know it.

I tried to get the folder correctly and see if pymodbustcp module is correctly installed.

Tried to see if the module is installed and if my previous programs worked.

IGDT
  • 3
  • 2
  • Did you activate the venv before installing? Please show all steps you are doing! – Markus Feb 18 '23 at 20:36
  • I think it has to do something with the venv and since I don't know how to activate it, it must be that. How would I do that? – IGDT Feb 19 '23 at 09:12
  • EDIT: I think I made it work by changing my python interpreter – IGDT Feb 19 '23 at 10:10
  • There are quite a couple of discussions here about usage of venv on Windows. E.g. https://stackoverflow.com/q/8921188/18667225 – Markus Feb 19 '23 at 17:11

0 Answers0