Comments (12)
As @matchai said, it's an issue with Python 2 (issue 28160), which was changed in Python 3.4.
This could mean that all Python 3 versions prior to 3.4 might have similar behaviour.
from starship.
@youssefhabri I'm going to try and fix this, as many people still use Python version <= 3.4.
from starship.
@youssefhabri I'm sorry, but I can't reproduce this error ... everything works fine in my terminal:
Are you using the latest code from master? (although I wouldn't think that would affect anything)
@matchai Do you know what's going on?
from starship.
This is likely due to them using a release candidate version of Python. 🤔
from starship.
I've added a dbg!
here:
match Command::new("python").arg("--version").output() {
Ok(output) => {
dbg!(&output);
Some(String::from_utf8(output.stdout).unwrap())
},
Err(_) => None,
}
and this is what I get:
[src/modules/python.rs:50] &output = Output {
status: ExitStatus(
ExitStatus(
0
)
),
stdout: "",
stderr: "Python 2.7.15rc1\n"
}
from starship.
this seems to be only happen with python2
, which python
is linked to. When I change to python3
it works fine.
from starship.
@youssefhabri that's extremely weird ... not quite sure how to approach this as if the user has both python2
and python3
, then if we check both we won't know which version to use.
from starship.
I think we should use whatever is linked to python
instead of considering python2
or python3
, as it works right now.
from starship.
so this is resolved?
from starship.
The problem seems to be that when python
is linked to python2
, the version no longer appears.
from starship.
so nothing to be changed at the moment?
from starship.
The issue appears to be that Python 2 logs it's version to stderr but we check stdout. We can retrofit the implementation to work with Python 2.
from starship.
Related Issues (20)
- [ FR ] Disable Git status tracking per directory HOT 1
- Draw right prompt before `line_break` HOT 1
- `fill` adds one too many spaces on Windows Terminal when used with `cmd_duration` HOT 1
- `bold fg:none` isn't bold HOT 1
- Feature/Refacto: Conflate all VCSes under an umbrella `vcs` module
- [Bash] PROMPT_COMMAND overriden or causes errors HOT 1
- Always showing `error_symbol` regardless of exit status of last operation HOT 1
- Irrelevant single character change in pyvenv.cfg changes the prompt displayed with the variable ($virtualenv) for Python
- nspawn wrongly detected as OCI HOT 5
- Update `git_metrics` example to work properly in clean repo
- Color on macOS is not correct HOT 1
- Conda section not using assigned color HOT 1
- The starship won't work if not commenting or deleting #Use manjaro zsh prompt portion in the .zshrc file. HOT 2
- Starship stopped to worked in WSL mode after connecting with VSCode HOT 1
- Installing starship on a QNAP NAS not working HOT 1
- Separators between command output
- Add uv flag to python module
- `git_state` showing symbols outside of git repo HOT 1
- Wrong offset for Unicode characters on tab completion HOT 2
- `[character]` is always `success_symbol` HOT 1
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 starship.