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.

Author peter.otten
Recipients navalkgupta, peter.otten, vstinner
Date 2014-02-27.13:22:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is expected. You cannot run/import 2.6 .pyc files in python 2.7 because the file format has changed.

$ echo 'print "hello"' > 
$ python2.6 -c 'import tmp'
$ rm
$ python2.7 -c 'import tmp'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: Bad magic number in tmp.pyc

Naval, if you do have the source make sure that you delete all occurrences of xxxx.pyc in directories preceding the directory containing in sys.path. Sometimes this error is the result of moving a .py file into another directory and forgetting to delete the leftover .pyc.
Date User Action Args
2014-02-27 13:22:03peter.ottensetrecipients: + peter.otten, vstinner, navalkgupta
2014-02-27 13:22:03peter.ottensetmessageid: <>
2014-02-27 13:22:03peter.ottenlinkissue20794 messages
2014-02-27 13:22:02peter.ottencreate