我正在尝试导入reportlab。在我调用
pip insatall reportlab
后,我使用 pip list
安装了 reportlab,它显示 reportlab
已安装,但我收到此错误。
Import "reportlab.lib.units" could not be resolvedPylancereportMissingImports
这就是我尝试导入的方式。
注意:我正在用Python开发我的项目
venv
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import letter, landscape
from reportlab.lib import colors
sys.path.append('/path/to/venv/lib/python3.x/site-packages') # Replace with the actual path to your virtual environment's packages directory
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import letter, landscape
from reportlab.lib import colors
在 Pythonista 中,虚拟路径会是什么样子?