Running script with different python version than project interpreter

I have a project where the python interpreter is set to python 2.7.  I have a specific script that I would like to run with python 3.7.  I am able to change the interpreter for the specific script and it will run with python 3.7 within pycharm however pycharm does not recognize the import statements and thinks that the package does not exist, presumably because it is still using python 2.7 when interpreting the script.  What can I do to fix this?

3 comments
Comment actions Permalink

Hello, 

 

In case you are changing interpreters, just make sure the package is installed for both venvs. 

 

Should you have any questions please let me know. 

0
Comment actions Permalink

It is.  As I said I can run the script from within Pycharm and it runs fine.

0
Comment actions Permalink

What link of warning do you have? 

 

Could you please upload a simplified project example to the FTP https://uploads.services.jetbrains.com/ and let me know the file name along with steps to reproduce the issue. 

 

 

 

0

Please sign in to leave a comment.