Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Can't use python environment - binary unsafe. #697

Closed
apoorv-kumar opened this issue May 24, 2019 · 13 comments
Closed

Can't use python environment - binary unsafe. #697

apoorv-kumar opened this issue May 24, 2019 · 13 comments
Labels

Comments

@apoorv-kumar
Copy link

Hi, I can't find any documentation around the error -

WARNING: The provided environment path "/home/apoorv/sandbox/venv/test_env" does not specify a functional Python environment (details: "The python binary is potentially unsafe."). Using fallback environment instead.".

I'm using Python3.5 environment on Ubuntu18.04.

@mlangkabel
Copy link
Contributor

@egraether: didn't you encounter this error, too?

@egraether
Copy link
Contributor

Yes, I think the problem was that there was no binary named python in the directory. I made a copy of my python36 binary and named it python. I think it helped with the problem, but I had a different one to fix then.

@apoorv-kumar
Copy link
Author

@egraether thank you for your response. I made sure that I have a 'python' binary in my env/bin but it doesn't seem to fix it. Unfortunately even verbose logs don't tell me more about the issue. Guess I'll have to wait to try it out for my projects.

@egraether
Copy link
Contributor

@apoorv-kumar Maybe it is a Sourcetrail execution environment problem. Did you start Sourcetrail directly from Terminal? If not, please try that.

@apoorv-kumar
Copy link
Author

@egraether I did open the 'Sourcetrail' binary from terminal.

@mlangkabel
Copy link
Contributor

We just released Sourcetrail 2019.2.39, which now displays validity information for the specified python environment directly in your project settings, so it's much faster for you to try different approaches. Can you for example try to specify the path directly to the Python executable of the virtual environment?

@pmneve
Copy link

pmneve commented Sep 18, 2019

Am having same issue.
/Users/nevep/.pyenv/bin/versions/2.7.9/bin/python specified directly in the environment textbox.
This and any other versions I try show 'binary is potentially unsafe'

@xanni
Copy link

xanni commented Nov 19, 2019

I'm having the same issue with Sourcetrail 2019.4.61.

@xichen-de
Copy link

Same here with a conda environment.

@tdamsma
Copy link

tdamsma commented Nov 19, 2019

Same with virtualenv installed environment on OS X / Sourcetrail 2019.4.61.

@petevdp
Copy link

petevdp commented Nov 20, 2019

Same here with virtualenv on Ubuntu 19.04

@XVicarious
Copy link

Okay, so I have tracked this issue down to this. Basically as this stands unless you change ownership on the python executable to root, a virtual environment won't work due to Jedi by default requiring an environment to be "safe". This line needs to be changed to include safe=False to allow virtual environments based on my quick research.

@mlangkabel
Copy link
Contributor

@XVicarious: Thank you for creating the new issue on the Python indexer repo and linking it here.

As this issue is fully within the scope of the Python indexer, we should continue disucssing it over at CoatiSoftware/SourcetrailPythonIndexer#59.

mlangkabel added a commit that referenced this issue Nov 28, 2019
This allows to use "unsafe" Python environment if this environment has explicitly been specified by the user (issues #697, #747).
egraether pushed a commit that referenced this issue Dec 16, 2019
This allows to use "unsafe" Python environment if this environment has explicitly been specified by the user (issues #697, #747).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants