Closed lcd1232 closed 7 years ago
@lcd1232 ,
Could you try something for me? Go to the settings of this plug-in and add an additional virtualenv path that points directly to the directory of one of your virtualenvs. For example, if your virtualenvs are located in ~/virtualenvs and you have two virtualenvs ~/virtualenvs/one and ~/virtualenvs/two you should add the following:
~/virtualenvs/one;~/virtualenvs/two
Tell me if after the manual configuration the plug-in list some virtualenv.
Thanks!
@pghilardi : I tried what you suggested. I have two virtualenvs (plus miniconda) and I added the path to one of those in the settings. Now when I open atom via the launcher, I get miniconda and the virtualenv that I specified. And when opening atom via the terminal, I get all three environments.
(p.s. previously I could only get miniconda and no virtualenvs when opening atom via the launcher)
@appukuttan-shailesh ,
Thanks for the prompt reply! So probably its something related to the WORKON_HOME variable. I have some questions:
Are you using the virtualenvwrapper? What is the content of your WORKON_HOME of virtualenvwrapper?
Yes, I am using virtualenvwrapper.
echo $WORKON_HOME
gives me:
/home/shailesh/environs
(which is where I store all my virtualenvs) and lsvirtualenv gives me:
py27_main
=========
test_env
========
@pghilardi : Bigger thanks to you for looking into this so quickly. Let me know if you need me to try out anything. Keen to get this working soon.
@appukuttan-shailesh and @lcd1232, the quickest solution and the one that I have implemented is to allow to specify the WORKON_HOME variable. To do this, you must check to use virtualenvwrapper and then add a forced value to the WORKON_HOME variable, in your case: /home/shailesh/environs or more short: $HOME/environs
I don't know why this variable is not being loaded in the situation that you have described, but for now I solved this way to not block you.
Test updating your package to 0.12.0 and let me know
@pghilardi after updating and restarting I got this error
Also maybe this will be useful for you.
$ echo $WORKON_HOME
/Users/lcd1232/.virtualenvs
UPDATE. I added this lines in file virtualenv-manager.coffee after line 27
...
# Add home folder on search of virtualenvs
console.log process.env
console.log process.env.HOME
console.log process.env.WORKON_HOME
getVirtualEnvsFromHome = atom.config.get('atom-python-virtualenv.getVirtualEnvsFromHome')
...
And got this in console:
Object
/Users/lcd1232
undefined
Where Object has item WORKON_HOME:"/Users/lcd1232/.virtualenvs"
@lcd1232,
My mistake. Try the new version 0.13.0. To make it work with the WORKON_HOME you should customize it directly in the settings.
Let me know!
@pghilardi : Great! That works for me :) ... Thanks for the quick fix.
@pghilardi, Yes this works. Thanks a lot.
So I am closing this. Thanks!
I installed this plugin but it doesn't find any virtualenvs. I'm using mac os and zsh with virtualenvwrapper. lsvirtualenv shows me list of virtualenvs.
Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4