I am trying to use atom as my python editor but every time I run the program I receive some weird error about PATH. -


i trying use atom python editor every time run program receive weird error path. code works fine in other editors such pyscripter not atom. have uninstalled , reinstalled atom multiple times receive same error.

# shmup game import pygame import random  width = 480 height = 600 fps = 60  # define colors white = (255, 255, 255) black = (0, 0, 0) red = (255, 0, 0) green = (0, 255, 0) blue = (0, 0, 255)  # initialize pygame , create window pygame.init() pygame.mixer.init() screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("shmup!") clock = pygame.time.clock()  class player(pygame.sprite.sprite):     def __init__(self):         pygame.sprite.sprite.__init__(self)         self.image = pygame.surface((50, 40))         self.image.fill(green)         self.rect = self.image.get_rect()         self.rect.centerx = width / 2         self.rect.bottom = height - 10         self.speedx = 0     def update(self):         self.speedx = 0         keystate = pygame.key.get_pressed()         if keystate[pygame.k_left]:             self.speedx = -5         if keystate[pygame.k_right]:             self.speedx = 5         if self.rect.right > width:             self.rect.right = width         if self.rect.left < 0:             self.rect.left = 0         self.rect.x += self.speedx  class mob(pygame.sprite.sprite):     def __init__(self):         pygame.sprite.sprite.__init__(self)         self.image = pygame.surface((30, 40))         self.image.fill(red)         self.rect = self.image.get_rect()         self.rect.x = random.randrange(width - self.rect.width)         self.rect.y = random.randrange(-100, -49)         self.speedy = random.randrange(1, 8)         self.speedx = random.randrange(-3, 3)      def update(self):         self.rect.x += self.speedx         self.rect.y += self.speedy         if self.rect.top > height + 10 or self.rect.left < -25 or          self.rect.right > width + 20:             self.rect.x = random.randrange(width - self.rect.width)             self.rect.y = random.randrange(-100, -49)             self.speedy = random.randrange(1, 8)    all_sprites = pygame.sprite.group() mobs = pygame.sprite.group() player = player() all_sprites.add(player) in range(8):     m = mob()     all_sprites.add(m)     mobs.add(m) # game loop running = true while running:     # keep loop running @ right speed     clock.tick(fps)     # process input (events)     event in pygame.event.get():         # check closing window         if event.type == pygame.quit:             running = false      # update     all_sprites.update()     # check see if mob hit player     hits = pygame.sprite.spritecollide(player, mobs, false)      # draw / render     screen.fill(black)     all_sprites.draw(screen)     # *after* drawing everything, flip display     pygame.display.flip()  pygame.quit() 

and error unable find command: python

are sure path configured correctly?  env path: c:\program files (x86)\intel\icls client\;c:\program files\intel\icls client\;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\program files\intel\wifi\bin\;c:\program files\common files\intel\wirelesscommon\;c:\program files\intel\intel(r) management engine components\dal;c:\program files\intel\intel(r) management engine components\ipt;c:\program files (x86)\intel\intel(r) management engine components\dal;c:\program files (x86)\intel\intel(r) management engine components\ipt;c:\program files (x86)\common files\lenovo\easyplussdk\bin;c:\programdata\lenovo\readyapps  error: spawn python enoent     @ exports._errnoexception (util.js:1026:11)     @ process.childprocess._handle.onexit (internal/child_process.js:193:32)     @ onerrornt (internal/child_process.js:359:16)     @ _combinedtickcallback (internal/process/next_tick.js:74:11)     @ process._tickcallback (internal/process/next_tick.js:98:9) 

does know do?

i'm going assume you're using atom-runner, in case, according response issue #127:

your path needs include @ least 1 directory python.exe binary inside of it. guess none of directories listed @ end have executable in them. should go python35 directory , python.exe binary (usually in bin\ sub-directory) , use path in environment variable.

i see don't have atom in path either, should add following directory it:

c:\users\<username>\appdata\local\atom\bin 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -