[Python] How to work with different python library with different interpreter

Discussão em 'Python' iniciado por Stack, Julho 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have some python interpreter installed in my computer:

    • Python 3.13.5 (Recommended)
    • Python 3.13.1 (Global)
    • Python 3.12.10
    • Python 3.12.3
    • Python 3.11.9

    But some libraries can only work with one interpreter, for example if I import these 2 libraries:

    import pyaudio
    import numpy as p


    With python 3.13.5 as the recommended version, the numpy library got some squiggly lines that says Import 'numpy' could not be resolved Pylance(ReportMissingImports). This error also appear when I choose the python 3.13.1.

    On the other hand, if I choose python 3.12.10 or python 3.12.3 as the interpreter, the similar error will show, but on the pyaudio library.

    It seems numpy uses Python 3.12, and pyaudio uses Python 3.13. How to fix this so I can work with the libraries? Should I uninstall/install the libraries or upgrade it? Or is there any specific way to install libraries on specific interpreter alone?

    Continue reading...

Compartilhe esta Página