Sublime Forum

Error in Anaconda?

#1

When I open Sublime Text-3, an error pop up, I think related to Anaconda Library.
The Error is :

<Anaconda.anaconda_lib.workers.local_worker.LocalWorker object at 0x7f99976c0f10> initial check failed because:

can not connect to /home/nikhil/.local/share/anaconda/run/anaconda-2/anaconda.sock. tried to connect 21 times during 2 seconds

check that there is Python process executing the anaconda jsonserver.py script running in your system. If there is, check that the Unix Domain Socket file /home/nikhil/.local/share/anaconda/run/anaconda-2/anaconda.sock exists and that you can connect to it writing the following script in your Sublime Text 3 console:

import socket; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(/home/nikhil/.local/share/anaconda/run/anaconda-2/anaconda.sock)

If anaconda works just fine after you received this error and the command above worked you can make anaconda to do not show you this error anymore settig the 'swallow_startup_errors' to 'true' in your configuration file.
0 Likes

#2

I have gone through the same error and frustrated my self by google-ing the solution.

finally tried my way to resolve it and found that anaconda needs to generate patch for new python releases.

please find below the solution if you are using python34(3.4) or above.
check your python version: goto command prompt and type “python” hit enter and the first line you get is your python version.

  1. goto path “C:\Users\user-name\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_lib\linting\pyflakes”

  2. Open file named checker.py

  3. search for word LOOP_TYPES in the file(probably in first 80 lines) which is looks like as below if its latest version of anaconda.

    if PY34:
    LOOP_TYPES = (ast.While, ast.For)
    else:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)

  4. replace above 4 lines with the below shown 4 lines.

    if PY2 or PY32 or PY33:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
    else:
    LOOP_TYPES = (ast.While, ast.For)

  5. restart your sublime.

use the python indentation after changing the lines :innocent:

let me know if you have any problem after this steps, this is first reply so not able to do formatting in replay.:disappointed_relieved:

3 Likes

#3

I am using Ubuntu -16.04, so is the procedure similar ?

0 Likes

#4

They should be, just replace/convert the paths from windows to linux or mac:

  • If you are a Windows/Mac user, just figure out where are your settings folders. (the folder Sublime Text 3\ below contain all your current settings)

    ~/.config/sublime-text-3/ --> “C:\Users\YOUR_USER_NAME\AppData\Roaming\Sublime Text 3”
    ~/.config/sublime-text-3/ --> “~/Library/Application Support/Sublime Text 3”

0 Likes