Cannot import logging.py after I renamed one of my source files logging.py in my Eclipse project
<p>I thought, I broke Eclipse by renaming one of my source file logging.py, I quickly changed the name to something else but Eclipse cannot find the original python standard file ... I reinstalled my Anaconda install but it did not correct the problem ... and I later discovered it was likely a Python problem (see Edit 1)</p>

<p>When I ask Eclipse to find or open the file from the 'import logging' line, it seems it cannot find it ...</p>

<p>Any idea to correct this problem without reinstalling Eclipse?</p>

<pre><code>Traceback (most recent call last):
  File "C:\Users\ailete\workspace\landema\main.py", line 56, in &lt;module&gt;
    import requests
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\__init__.py", line 53, in &lt;module&gt;
    from .packages.urllib3.contrib import pyopenssl
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\__init__.py", line 27, in &lt;module&gt;
    from . import urllib3
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\urllib3\__init__.py", line 8, in &lt;module&gt;
    from .connectionpool import (
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\urllib3\connectionpool.py", line 35, in &lt;module&gt;
    from .connection import (
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\urllib3\connection.py", line 43, in &lt;module&gt;
    from .util.ssl_ import (
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\urllib3\util\__init__.py", line 19, in &lt;module&gt;
    from .retry import Retry
  File "C:\Users\ailete\Anaconda2\Lib\site-packages\requests\packages\urllib3\util\retry.py", line 15, in &lt;module&gt;
    log = logging.getLogger(__name__)
AttributeError: 'module' object has no attribute 'getLogger'
</code></pre>

<p><strong>Edit 1</strong></p>

<p>The problem happens with the executable generated by pyinstaller too ?! :</p>

<pre><code>...
LOADER: Running main.py
Traceback (most recent call last):
  File "&lt;string&gt;", line 43, in &lt;module&gt;
  File "c:\users\ailete\appdata\local\temp\pip-build-iulqaq\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 363, in load_module
  File "C:\Users\ailete\workspace\landema\entities.py", line 7, in &lt;module&gt;
    from config import locale, ribbon_menu
  File "c:\users\ailete\appdata\local\temp\pip-build-iulqaq\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 363, in load_module
  File "C:\Users\ailete\workspace\landema\config.py", line 7, in &lt;module&gt;
    import logging
ImportError: No module named logging
main returned -1
...
</code></pre>

<p>First, define modules path, where built-in module logging is placed:</p>

<pre><code>user@host:$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import sys
&gt;&gt;&gt; sys.path
['/usr/lib/python2.7', ... ]
</code></pre>

<p>Second, ensure that there is a logging package. In my OS i have <code>/usr/lib/python2.7/logging</code>. I think you renamed the package accidentally; If so, rename it back.</p>

python eclipse rename pyinstaller pyc