pghilardi / atom-python-virtualenv

Python virtualenv support for Atom
MIT License
16 stars 6 forks source link

[Mac OS X] "Get virtualenvs from the virtualenvwrapper folder?" not working #20

Closed bgtron closed 6 years ago

bgtron commented 7 years ago

Hi dude!

Thanks for the awesome plug-in...but I think it has a bug. If I launch Atom from the commandline after activating my venv, then I can activate the venv in Atom. If I launch it my clicking on the app (Mac OS X 10.12.3) then when I try to activate a venv, the list is empty. If I then go into the plugin settings and toggle the "Get virtualenvs from the virtualenvwrapper folder?" check box, then when I try to activate it lists the venvs.

Also, just FYI, I have the "Get virtualenvs from the home folder?" disabled. Maybe I'm doing something wrong? I'd rather not have to open Atom from the command line.

Atom: v1.17.0 atom-python-virtualenv: 0.13.0

pghilardi commented 7 years ago

@bgtron ,

Thanks man!

I need to investigate how to solve this problem but I think that is related to other problem reported some days ago. The problem is that the virtualenvs are not listed when opening Atom clicking on the app instead from the terminal (with or without a virtualenv activated). This bug occurs in Ubuntu too.

I am investigating and I will return to you asap.

pghilardi commented 7 years ago

@bgtron ,

I have some additional questions about your configuration: 1) Are you using the virtualenvwrapper or yours virtualenvs are inside your home folder? 2) After the first time that you checked the check box "Get virtualenvs from the virtualenvwrapper folder" your envs were listed, right? Now I want you to you uncheck it, close Atom and then re-open clicking on the app. Report to me if it will work and load your virtualenvs correctly?

pghilardi commented 7 years ago

@bgtron ,

I suggest you to update to the latest version 0.13.1 and check if it works.

bgtron commented 7 years ago

So, sadly, 0.13.1 does not appear to be any different. I am using virtualenvwrapper and all the virtual environments are in $HOME/.virtualenvs.

I tried unchecking the box and restarting, but the list of discovered virtualenvs was empty. I guess this isn't surprising. ;) As soon as I check the box the first time, Atom properly lists the discovered virtualenvs. I hope this helps.

pghilardi commented 7 years ago

@bgtron,

Now you have the checkbox checked, right? And even with it checked, when you open Atom it does not list any virtualenv?

This is weird, because you have the most normal set-up with the envs inside the $HOME/.virtualenvs folder. I am still investigating how to reproduce this and probably I will need your help.

bgtron commented 7 years ago

Yeah...it is enabled and it still doesn't show the virtualenvs. I'm going to be away from a computer for a week starting tomorrow, so I won't be much help. Sorry. When I'm back I'd love you help if you still need it.

pghilardi commented 7 years ago

@bgtron ,

I will try to simulate this in a MacOS environment, because I am having some problems to reproduce this behavior. I will keep you informed.

luisnabais commented 7 years ago

On Arch Linux x86_64 with GNOME 3.24 the same occurrs. My environments are in $HOME/.virtualenvs/, created with virtualenvwrapper. However, atom-python-virtualenv doesn't show them when I click on the icon to open Atom. It does show up, however, when I run atom from terminal. I'm guessing it can't see my user when running from icon click in desktop enviroment app launcher?

OJFord commented 7 years ago

The same appears to be true of 'venv' inside project directories, nothing shows up. (With other sources disabled.)

pghilardi commented 6 years ago

@OJFord

I am releasing a new version (1.0.0) this week that I think that will fix this issue related to venv inside project directories.

pghilardi commented 6 years ago

@luisnabais ,

Could you try the latest version 1.0.0 and check if the problem is solved?

bgtron commented 6 years ago

I can confirm that 1.0.2 resolves this issue. Thanks!

luisnabais commented 6 years ago

I confirm it works as well. However, If I had WORKON_HOME set to '$HOME/.virtualenvs;' with the ';', just like the example above, it doesn't work. If I remove the semicolon, it works.