This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年05月21日 22:19 by Philip.Drew, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (15) | |||
|---|---|---|---|
| msg136481 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月21日 22:19 | |
Upon execution of python.exe a command line box appears for a fraction of a second, closes and is followed by nothing. On executing IDLE from the start menu, nothing happens. I have installed python to C:\Python27 using the python windows installer. I am running win7 64 bit on a toshiba satellite 17X |
|||
| msg136482 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年05月21日 22:22 | |
Can you try to open a Windows terminal (start->run->cmd or win+r on the keyboard), cd to Python27, execute python.exe and see if it gives any error message there? |
|||
| msg136530 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月22日 14:14 | |
The error message is: ImportError: No module named site. |
|||
| msg136531 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年05月22日 14:25 | |
The 'site' module should be in Python27\Lib\site.py. You could try to run "python.exe -v" to see if it says something useful in the output, or maybe try to reinstall Python and see if it works. |
|||
| msg136532 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月22日 14:53 | |
The site module is in the right place This is what I got running the -v flag: (I don't know what you're looking for) Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\PWTD>c:\Python27\python.exe -v # installing zipimport hook import zipimport # builtin # installed zipimport hook ImportError: No module named site # clear __builtin__._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.exitfunc # clear sys.exc_type # clear sys.exc_value # clear sys.exc_traceback # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # clear sys.flags # clear sys.float_info # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] zipimport # cleanup[1] signal # cleanup[1] exceptions # cleanup[1] _warnings # cleanup sys # cleanup __builtin__ # cleanup ints: 6 unfreed ints # cleanup floats C:\Users\PWTD>c:\Python27\python.exe ImportError: No module named site |
|||
| msg136610 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月23日 11:08 | |
Reinstalling makes no difference- have tried multiple times |
|||
| msg136622 - (view) | Author: Tim Golden (tim.golden) * (Python committer) | Date: 2011年05月23日 12:25 | |
What happens if you try "python -S" (capital S)? In principle this should bypass the need to load site.py. Even if that works we still have a problem to solve, but at least it might narrow things down. |
|||
| msg136668 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月23日 16:14 | |
Gave it a go: the prompt appears, but none of the functions work thereafter C:\Users\PWTD>c:\Python27\python -S Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 >>> print "hello" LookupError: no codec search functions registered: can't find encoding >>> |
|||
| msg136674 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2011年05月23日 16:23 | |
From a Windows command prompt: - what is the output of "chcp"? - maybe an environment variable issue? Try "set PY" to display all variables starting with PY. |
|||
| msg136679 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月23日 16:45 | |
C:\Users\PWTD>set PY PYTHONHOME=c:\program files (x86)\steam\steamapps\common\alien swarm\swarm\..\sdktools\python2円.5 C:\Users\PWTD>chcp Active code page: 850 C:\Users\PWTD> |
|||
| msg136685 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2011年05月23日 17:10 | |
hmm, I don't like this PYTHONHOME. Can you reset its value and run python again in the same terminal? C:\Users\PWTD>set PYTHONHOME= C:\Users\PWTD>c:\Python27\python |
|||
| msg136732 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月24日 10:53 | |
Ok, python now works in command prompt, but IDLE still wont run. Also, PYTHONHOME needs to be reset on every start up of command prompt. |
|||
| msg136736 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2011年05月24日 11:03 | |
Yes, this is probably a system-wide setting. PYTHONHOME should not be set, especially if it points to another python installation. You should consider removing it. Is "alien swarm" a game? Why did it modify the system this way? Does the game still work when you remove the environment variable? |
|||
| msg136739 - (view) | Author: Philip Drew (Philip.Drew) | Date: 2011年05月24日 11:28 | |
Awesome. It's fixed- do you still want to know whether or not the game works. In case it helps, I installed the game before python |
|||
| msg136740 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2011年05月24日 11:32 | |
It's definitely a bad thing to set PYTHONHOME at the system level, when there are several pythons installed. Please report this to the game's developers. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:17 | admin | set | github: 56349 |
| 2011年05月24日 11:32:43 | amaury.forgeotdarc | set | status: open -> closed resolution: not a bug messages: + msg136740 stage: resolved |
| 2011年05月24日 11:28:53 | Philip.Drew | set | messages: + msg136739 |
| 2011年05月24日 11:03:35 | amaury.forgeotdarc | set | messages: + msg136736 |
| 2011年05月24日 10:53:44 | Philip.Drew | set | messages: + msg136732 |
| 2011年05月23日 17:10:11 | amaury.forgeotdarc | set | messages: + msg136685 |
| 2011年05月23日 16:45:18 | Philip.Drew | set | messages: + msg136679 |
| 2011年05月23日 16:23:41 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg136674 |
| 2011年05月23日 16:14:19 | Philip.Drew | set | messages: + msg136668 |
| 2011年05月23日 12:25:40 | tim.golden | set | nosy:
+ tim.golden messages: + msg136622 |
| 2011年05月23日 11:08:01 | Philip.Drew | set | messages: + msg136610 |
| 2011年05月22日 14:53:21 | Philip.Drew | set | messages: + msg136532 |
| 2011年05月22日 14:25:41 | ezio.melotti | set | messages: + msg136531 |
| 2011年05月22日 14:14:39 | Philip.Drew | set | messages: + msg136530 |
| 2011年05月21日 22:22:34 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg136482 |
| 2011年05月21日 22:19:54 | Philip.Drew | create | |