Unable to run Python interpreter in terminal, through Anaconda3
<p>When I try the "python" or "python3" command to run the interpreter, this is the error am getting.</p>

<pre><code>[sidgupta234@sidgupta234-Lenovo-G580 Downloads]$ python
    Failed to import the site module
    Traceback (most recent call last):
      File "/usr/lib/python3.5/site.py", line 580, in &lt;module&gt;
        main()
      File "/usr/lib/python3.5/site.py", line 566, in main
        known_paths = addusersitepackages(known_paths)
      File "/usr/lib/python3.5/site.py", line 287, in addusersitepackages
        user_site = getusersitepackages()
      File "/usr/lib/python3.5/site.py", line 263, in getusersitepackages
        user_base = getuserbase() # this will also set USER_BASE
      File "/usr/lib/python3.5/site.py", line 253, in getuserbase
        USER_BASE = get_config_var('userbase')
      File "/usr/lib/python3.5/sysconfig.py", line 595, in get_config_var
        return get_config_vars().get(name)
      File "/usr/lib/python3.5/sysconfig.py", line 538, in get_config_vars
        _init_posix(_CONFIG_VARS)
      File "/usr/lib/python3.5/sysconfig.py", line 410, in _init_posix
        from _sysconfigdata import build_time_vars
      File "/usr/lib/python3.5/_sysconfigdata.py", line 6, in &lt;module&gt;
        from _sysconfigdata_m import *
    ImportError: No module named '_sysconfigdata_m'
</code></pre>

<p>Output to <code>which python</code></p>

<pre><code>[sidgupta234@sidgupta234-Lenovo-G580 Downloads]$ which python
/usr/bin/python
</code></pre>

<p>Output to <code>python -V</code></p>

<pre><code>[sidgupta234@sidgupta234-Lenovo-G580 Downloads]$ python -V
Python 3.5.2 :: Continuum Analytics, Inc.
</code></pre>

<p><br><br>
Could you tell me the reason of this error and how can I remove it?
I found this <a href="https://forum.siduction.org/index.php?topic=5489.0" rel="nofollow">link</a> while looking for the solution, but it didnt make any difference.</p>

<p>That is an strange situation you have gotten yourself into, and if Continuum had any part of it (where I'm an engineer) we'd like to understand what we did that led to it so we can avoid it in the future.</p>

<p>Where did you try installing Anaconda?  Did you set any environment variables?</p>

<p>The "easiest-to-resolve" cause of this problem is that you have set some environment variables that are mixing system Python libraries and Anaconda Python libraries.  You should look at the output of:</p>

<pre><code>env | grep -i anaconda
</code></pre>

<p>and see if anything comes up that specifies a path to Anaconda.  The only one that should appear is an entry in <code>PATH</code>.  If there are any <code>LD_LIBRARY_PATH</code>, <code>PYTHONPATH</code>, <code>PYTHONHOME</code> or similar environment variables that point to Anaconda then that is going to be a problem.</p>

<p>The only other thing I can think of is that you specified <code>/usr</code> as the install path for Anaconda.  If that is the case you are probably in for a world of pain: you have just replaced your system Python with Anaconda.  You should investigate how to force-reinstall whichever Python package comes with your *nix distribution, but even that might be tricky: tools such as <code>yum</code> are written in Python and will need a working system Python interpreter to work.  But RPM is binary (if you're on a RedHat or derivative distro), so maybe you can <code>wget</code> or <code>curl</code> the necessary system Python packages and force-install them to try and fix things.</p>

<p>Let us know if that is enough information for you to fix things or at least identify the source of the problem a little better.</p>

python anaconda