C:\Users\antvai01\Linux\host\tests>python -m pip install pyserial
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyserial in c:\users\antvai01\appdata\roaming\python\python37\site-packages (3.5)
C:\Users\antvai01\Linux\host\tests>sp_controller.py
Traceback (most recent call last):
File "C:\Users\antvai01\Linux\host\tests\sp_controller.py", line 7, in <module>
import get_sw_version
File "C:\Users\antvai01\Linux\host\tests\get_sw_version.py", line 3, in <module>
from MHUBridge import *
File "C:\Users\antvai01\Linux\host\tests\MHUBridge\__init__.py", line 1, in <module>
from .Svalinn_MHU_Bridge import *
File "C:\Users\antvai01\Linux\host\tests\MHUBridge\Svalinn_MHU_Bridge.py", line 5, in <module>
import serial
ModuleNotFoundError: No module named 'serial'我甚至从源码上手动安装了pyserial,仍然存在同样的问题。有什么想法吗?
发布于 2021-02-07 20:07:48
它正在安装到非默认位置:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyserial in c:\users\antvai01\appdata\roaming\python\python37\site-packages (3.5)此位置可能不在您的PYTHONPATH中。
我想看看为什么你的正常站点包文件夹是不可写的
https://stackoverflow.com/questions/66087577
复制相似问题