Comments (17)
Did you set $PATH
for Emacs correctly? Please check with M-x get-env RET PATH
and S-M ! python --version RET
.
from doom-modeline.
@seagle0128
python version says it 2.7.15
from doom-modeline.
I believe Python 2.7 is used in your emacs env. You should use exec-path-from-shell
on macOS to set env vars from shell correctly.
from doom-modeline.
Yes, it says 2.7.15
from doom-modeline.
unfortunately, can't make it work :(
from doom-modeline.
I think it's happening, because in line 1154 it searches directy for the "python" executeable. So you would have to change it there directly to "python3".
from doom-modeline.
@r0m4n27 I set it like that:
(setq python-shell-interpreter "/usr/local/bin/python3"
flycheck-python-pycompile-executable "/usr/local/bin/python3"
python-shell-exec-path "/usr/local/bin/python3")
But modeline still showing 2.7.15 version :(
from doom-modeline.
@karambaq I think you didn't get the point. The doom-modeline
use python --version
to get the version. If python
is not in the $PATH of Emacs (not in shell), the version is not what you want. Per your description, both python
and python3
are in your system. The simple way is make a link symbol for python3
, and put it into /usr/local/bin
. I don't use python-shell-interpreter
since people may use ipython
or something else.
Hope it's clear to you. Please close if it does work for you.
from doom-modeline.
I'd like close it now since there is no more feedback. Please feel free to reopen if you still have any issue.
from doom-modeline.
Thanks to #18 , (setq doom-modeline-python-executable "python3")
should works.
However, on my Mac, it changes Python 2.7.10
to Python
, the version disappears...
from doom-modeline.
@bebound I guess Python2 is not in exec-path
. Eval (executable-find doom-modeline-python-executable)
in Emacs and check the output, please.
from doom-modeline.
If I set the variable to python3
, it outputs /usr/local/bin/python3
. Otherwise, it outputs /usr/bin/python
.
I'm using macOS and Spacemacs, 2.7.10
is the System Python, and I used homebrew to install 2.7.15
and 3.7.0
. It seems that the $PATH
in Emacs GUI is weird.
In shell, the $PATH
is /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:.:/Users/kk/.gem/ruby/2.3.0/bin/
In emacs, M-x
shell, $PATH
is /usr/bin:/bin:/usr/sbin:/sbin:.:/Users/kk/.gem/ruby/2.3.0/bin/:.:/Users/kk/.gem/ruby/2.3.0/bin/
, I don't know what prepend /usr/bin
at the beginning.
from doom-modeline.
You should set correct environment variables in Emacs. You can use exec-path-from-shell
to import env vars from shell.
from doom-modeline.
OK, I'll try this.
But after I set python-executable to python3, the version number disappears, is this correct? /usr/local/bin/python3
is python 3.7.0
from doom-modeline.
@bebound I think you don't get the point. after (setq doom-modeline-python-executable "python3")
, you still need to confirm if python3
is in exec-path
and $PATH
in emacs. Or you just use (setq doom-modeline-python-executable "/usr/local/bin/python3")
.
from doom-modeline.
Ahh, I see, thank you.
from doom-modeline.
I am using this in my init.el
(when (and (executable-find "python3")
(string= python-shell-interpreter "python"))
(setq python-shell-interpreter "python3"))
;; Env vars
(with-eval-after-load 'exec-path-from-shell
(exec-path-from-shell-copy-env "PYTHONPATH"))
from doom-modeline.
Related Issues (20)
- Error using with latest eglot / jsonrpc packages HOT 4
- Can the 'which-function' be disabled? HOT 2
- [Bug] buffer-position formatting won't respect flags in format specifier for column HOT 4
- [Bug] Lightbulb symbol 01F4A1 not displaying in mode line HOT 3
- [Feature Request] display-all-git-branches HOT 2
- [Bug] Icons on modeline lack sufficient padding HOT 14
- [Bug] modeline fragments do not get updated correctly when a command that changes the current-buffer is running HOT 3
- [Bug] HOT 3
- [Bug] Setting a left window margin clips the modeline on the right HOT 4
- [Bug] Compiler warnings after 311a0c5 HOT 1
- Fix the few faces that don't inherit from doom-modeline HOT 1
- Symbol’s function definition is void: doom-modeline-check-icon HOT 4
- [Bug] Typo in commit 3f1d33a
- Differentiate error states for checker segment HOT 1
- [Bug] Error during redisplay HOT 1
- [Bug] Reference to free variable `keel-menu-map' after 1d0942d HOT 2
- [Feature Request] new doom-modeline-buffer-file-name-style project-and-filename
- help-echo text not showing when in lsp-mode[Bug] HOT 4
- [Bug] Space inconsistency between `buffer-position` and `selection-info` HOT 7
- [Bug] Compiler warnings about `meow*` functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doom-modeline.