I am new to python. I guess there are libraries called numpy, anaconda etc. What the best init.el setup for this. (I want to work on ML or Data Science)

  • jangid@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Following is my configuration for Python; I am using Emacs 29.1 --with-tree-sitter:

      (use-package treesit
        :config
        (setq treesit-language-source-alist
    	  '((python . ("https://github.com/tree-sitter/tree-sitter-python.git"))))
        (add-to-list 'auto-mode-alist
    		 `("\\.py[iw]?\\'\\|python[0-9.]*" . python-ts-mode)))
    
      (use-package eglot
        :hook ((python-mode . eglot-ensure)	; pip install 'python-language-server[all]'
    	   (python-ts-mode . eglot-ensure)))