我已安装Python 2.7,并在Windows上安装了Anaconda(使用Python 3.6)。每当我尝试在Anaconda环境之外的Windows中运行我的.py脚本时,Windows默认使用Python 2.7解释器。我的脚本无法导入模块(我认为这是使用错误的解释器)。
我尝试根据此帖子How should I set the default Python version in Windows和此帖子Changing python interpreter windows更改路径变量。我还尝试直接从命令行将默认的.exe从2.7版本更改为Anaconda中的Python.exe。
我需要考虑Anaconda版本是否位于“C:\ Users \ william \ AppData \ Local \ Continuum \ anaconda3 \ python.exe”?所有其他帖子都将Python.exe称为类似“C:// python27 /”之类的内容。我期望能够将默认解释器设置为使用上述位置,并将其设置为.py文件的默认值。
当前Python版本: 假设这是来自:
我尝试根据此帖子How should I set the default Python version in Windows和此帖子Changing python interpreter windows更改路径变量。我还尝试直接从命令行将默认的.exe从2.7版本更改为Anaconda中的Python.exe。
我需要考虑Anaconda版本是否位于“C:\ Users \ william \ AppData \ Local \ Continuum \ anaconda3 \ python.exe”?所有其他帖子都将Python.exe称为类似“C:// python27 /”之类的内容。我期望能够将默认解释器设置为使用上述位置,并将其设置为.py文件的默认值。
当前Python版本: 假设这是来自:
我假设我想要使用这个版本:
我已经尝试将以下内容添加到用户和系统路径变量中: