Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD Date: Thu, 24 Dec 2015 17:45:38 -0500 Lines: 50 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de J66UkL5pFak1k+L4WYUY6w4M6Vu5VfnDJMbengMmZmQw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:IDLE': 0.04; '"""': 0.05; "'python": 0.07; '*not*': 0.07; '"my': 0.09; 'cached': 0.09; 'effect.': 0.09; 'exist.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'uninstalled': 0.09; 'wrong,': 0.09; 'python': 0.10; 'itself.': 0.11; 'jan': 0.11; '2.7': 0.13; 'suggest': 0.15; 'skip:p 40': 0.15; 'thu,': 0.15; '24,': 0.16; '__pycache__': 0.16; 'empty.': 0.16; 'idlelib': 0.16; 'incomplete': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'uninstall': 0.16; 'version).': 0.16; 'wrote:': 0.16; 'alternate': 0.18; 'runs': 0.18; '2015': 0.20; 'meant': 0.22; 'mixed': 0.22; 'am,': 0.23; '(or': 0.23; 'installation': 0.23; 'dec': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'install': 0.25; 'header:User-Agent:1': 0.26; 'command': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:" 20': 0.26; 'mostly': 0.27; 'looks': 0.29; 'exists,': 0.29; 'program,': 0.29; 'entry': 0.31; 'compiled': 0.32; 'run': 0.33; 'point': 0.33; 'problem': 0.33; 'directory,': 0.33; 'idle': 0.33; 'file': 0.34; 'running': 0.34; 'path': 0.35; 'something': 0.35; 'but': 0.36; 'skip:i 20': 0.36; 'should': 0.36; 'needed': 0.36; 'received:71': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'mac': 0.37; "won't": 0.38; 'files': 0.38; 'mean': 0.38; 'sure': 0.39; 'does': 0.39; 'skip:x 10': 0.40; 'to:addr:python.org': 0.40; 'where': 0.40; 'still': 0.40; 'your': 0.60; 'profile': 0.63; 'subject': 0.70; 'elevated': 0.84; 'suggestion,': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-71-185-227-36.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100842 On 12/24/2015 9:59 AM, eryk sun wrote: > On Thu, Dec 24, 2015 at 5:06 AM, Nicky Mac wrote: >> >> not sure what you mean by "my profile". >> following your suggestion, looks normal: > > I meant your profile directory, "C:\Users\Nick". But printing the > package path showed the problem is in your Python 3 installation > itself. > >> C:\Users\Nick> python -c "import importlib; >> print(importlib.find_loader('idlelib').path)" >> C:\Python\Python35\lib\idlelib\__init__.pyc > > This file should not exist. Python 3 stores .pyc files in a > __pycache__ subdirectory. It won't even run "idlelib\__init__.pyc" if > "idlelib\__init__.py" exists, so your installation is incomplete and > damaged. I suggest that you uninstall Python 3.5 and then completely > remove "C:\Python\Python35" before reinstalling. 'python -m xyz', where xyz is a package name (directory on disk), runs xyx/__main__.py (or the xyz/__pycache__/__main__...34.py compiled version). This file currently contains the following implementation, subject to change. """ IDLE main entry point Run IDLE as python -m idlelib """ import idlelib.PyShell idlelib.PyShell.main() # This file does not work for 2.7; See issue 24212. The errant __init__.pyc should not directly be a problem, but does indicate something wrong, such as 2.7 files mixed into your 3.5 install (__cache__ is *not* used in 2.7). Based on my experience with this happening, you might try running chkdsk, from an elevated Command Prompt. 'python -m idlelib.idle' runs idlelib/idle.py (or the cached version) to mostly the same effect. The alternate entry has adjustments so it works in an uninstalled development repository, while still working in an installation. From a python program, 'import idlelib.idle' needed as 'import idlelib' would run idlelib/__init__.py, which is empty. -- Terry Jan Reedy