简体   繁体   English

Windows上使用脚本包的Atom上的Python 3

[英]Python 3 on Atom using Script package on Windows

I am trying to run Python3 on atom editor using script package (Windows). 我正在尝试使用脚本包(Windows)在原子编辑器上运行Python3。 I have python 2.7 installed as well. 我也安装了python 2.7。 I cannot change the settings to use python 3. Here are the things I have tried: 我无法更改设置以使用python3。这是我尝试过的事情:

  1. I changed the mycomputer->properties->advanced settings->environment variables->PYTHONPATH to python3 executable location C:\\Users\\\\Programs\\Python\\Python36 我将mycomputer-> properties-> advanced settings-> environment variables-> PYTHONPATH更改为python3可执行位置C:\\ Users \\\\ Programs \\ Python \\ Python36
  2. In atom, under File->config I changed the pythonPaths:"C:\\Users\\\\Programs\\Python\\Python36\\python.exe" 在原子上,在“文件”->“配置”下,我更改了pythonPaths:“ C:\\ Users \\\\ Programs \\ Python \\ Python36 \\ python.exe”
  3. I also tried packages->Script->Configure Script and tried following options for Command 我还尝试了package-> Script-> Configure Script,并尝试了Command的以下选项

    C:\\Users\\\\Programs\\Python\\Python36\\python.exe C:\\ Users \\\\ Programs \\ Python \\ Python36 \\ python.exe

    C:\\Users\\\\Programs\\Python\\Python36 C:\\ Users \\\\ Programs \\ Python \\ Python36

    C:\\Users\\\\Programs\\Python\\Python36 C:\\ Users \\\\ Programs \\ Python \\ Python36

    C:/Users//Programs/Python/Python36 C:/用户//程序/ Python / Python36

but none of them seem to work. 但它们似乎都不起作用。

To check the version, I am using 要检查版本,我正在使用

import sys
print(sys.version)

which outputs 哪个输出

2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] 2.7.11(v2.7.11:6d1b6a68f775,2015年12月5日,20:40:30)[MSC v.1500 64位(AMD64)]

Atom will use whichever version of python is the default for the directory you run it from. Atom将使用运行它的目录的默认版本的任何python版本。 I run atom using the command line on a mac. 我在Mac上使用命令行运行Atom。 If I run python from a directory and it open a python 2.7 line, running atom from same directory will result in atom using python 2.7. 如果我从目录运行python并打开python 2.7行,则从同一目录运行atom会导致使用python 2.7的atom。 I know you don't have access to unix window on a Windows machine but same should apply. 我知道您无权访问Windows机器上的Unix窗口,但同样应该适用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM