1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] how to set directory to look for modules (spyder)?

Discussão em 'Python' iniciado por Stack, Setembro 17, 2025.

  1. Stack

    Stack Membro Participativo

    i am a complete newbie in python and am trying to get familiar with spyder as IDE. is it possible to set the location where spyder looks for the module when a script is executed? for some reason, if i execute a script, it is looking for a module in another site-package folder than I have defined in enviroment variable in PATH.

    In my case, spyder is looking for a module in ...AppData\Roaming\Python\Python311\site-packages while although ...AppData\Roaming\Python\Python313\site-packages is stated in PATH. can it be related to another Python interpreter installed on my computer which is probably referring to the Python311?

    I installed a module using pip. it was installed successfully in Python313. yet, spyder is looking for the module in Python311 where the module isn't. In understand, i could also use sys.path (in every script?) to specify the location. But I believe that defining it in PATH would be the more general and better way.

    Continue reading...

Compartilhe esta Página