[Solved] How can i solve this error "ModuleNotFoundError: No module named 'encodings'" under ubuntu20.04? #2147
-
|
I want to use Python in a .NET project, and under Windows, I can use Python with the python3.10.dll. Unfortunately, this project needs to run in a Docker container. First, I tried to set up all components in Ubuntu 20.04, but when I linked the python3.10.so to Runtime.PythonDLL, I got the following error: Python path configuration: Current thread 0x00007f1641311740 (most recent call first): My guess is that I'm not setting some necessary library, but I don't know which one it is. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
I could fix it. Unfortunately, under Ubuntu, we cannot use the PYTHONHOME and PYTHONPATH variables. If you use these variables, you will get the "ModuleNotFoundError: No module named 'encodings'" error. If you use your own packages, such as creating a class structure and importing it into your project file, you must copy it to the "dist-packages" folder. |
Beta Was this translation helpful? Give feedback.
I could fix it. Unfortunately, under Ubuntu, we cannot use the PYTHONHOME and PYTHONPATH variables. If you use these variables, you will get the "ModuleNotFoundError: No module named 'encodings'" error. If you use your own packages, such as creating a class structure and importing it into your project file, you must copy it to the "dist-packages" folder.