Closed MrMaksimize closed 10 years ago
Thanks. This looks like an installation issue. A few questions:
:Geeknote
)?geeknote login
)?Hi Neil! Thanks for responding. The result is the same when I run :Geeknote inside of vim. And I'm also able to invoke the Geeknote CLI.
I did a bit of debugging last night, and found that when I print my sys.path from vim_geeknote.vim the list of paths I get is much shorter than when I print them from the regular REPL from within the terminal. It doesn't seem to include homebrew Python paths only the paths to /Library/Python.
So I'm wondering if it's just a path or environment issue but I'm stumped on how to fix or debug it.
Thanks so much again!
Unfortunately, I don't have a mac that I can test this on. You're on the right track though. The error is definitely indicating that python cannot find the geeknote python modules. You may find this information helpful:
It's not really what I would recommend, but the most obvious brute force workaround may just be to copy the geeknote modules into the vim-geeknote installation directory (e.g. vim-geeknote/plugin/geeknote/geeknote.out, ...).
I also found this:
https://github.com/Lokaltog/powerline/issues/344
It seems related. I'll study that issue more.
Something else you may want to try would be add the following at the top of your vim-geeknote.vim
file:
python sys.path.append('/usr/local/lib/python2.7/dist-packages/geeknote-0.2a-py2.7.egg/')
You'll have to adapt that based on your setup. It's obviously not a good long-term fix, but it would interesting to know if that works.
Huh. this is super weird.
My guess is it's somehow related homebrew, and maybe me screwing around with Python in my os before. But I got it resolved in a really dirty way.
I took the paths I was seeing in the REPL and just exported them into the $PYTHONPATH variable.
Looks like this now:
export PYTHONPATH=/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:/Library/Python/2.7/site-packages:/usr/local/lib/python2.7/site-packages:/Users/MrMaksimize/bin:/Users/MrMaksimize/.vim_runtime/sources_non_forked/vim-geeknote/plugin:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7:/Library/Python/2.7/site-packages:/usr/local/lib/python2.7/site-packages:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old:/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload:$PYTHONPATH
And then it worked. It's almost like vim is it's own python environment.
Thanks so much for your help! I'll let you close it in case you had another comment or maybe know why it's going on :)
Weird indeed. Perhaps someday I'll get a mac to play on. Thanks for digging into it. I'll know what to suggest now if anyone else runs into the issue.
I encountered this same issue. The root cause was a combination of Mac Ports options and not being careful between the OS python and the Mac Ports python. The cleanest solution was to do the following:
Install the Mac Ports python: port install python27 port select --set python python27 port install py-pip27 port select --set pip pip27
Install the Mac Ports vim with python enabled: port install vim +huge +python27
Install and configure Geeknote using the Mac Ports python
cd
From this point on, vim-geeknote worked like a charm on Mac OS X (Yosemite) without the previous errors.
Thank you for sharing. I will add this to the README.
On Thu, Nov 6, 2014 at 7:41 PM, Brian Zaugg notifications@github.com wrote:
I encountered this same issue. The root cause was a combination of Mac Ports options and not being careful between the OS python and the Mac Ports python. The cleanest solution was to do the following:
Install the Mac Ports python: port install python27 port select --set python python27 port install py-pip27 port select --set pip pip27
Install the Mac Ports vim with python enabled: port install vim +huge +python27
Install and configure Geeknote using the Mac Ports python cd ; /opt/local/bin/python setup.py install
From this point on, vim-geeknote worked like a charm on Mac OS X (Yosemite) without the previous errors.
— Reply to this email directly or view it on GitHub https://github.com/neilagabriel/vim-geeknote/issues/12#issuecomment-62083333 .
Yeah I can't get it to work on my mac either. I tried with both the built-in python and the homebrew version.
Neilagabriel - when I first installed GEEKNOTE (2 weeks ago) I was able to operate it from the command line. Now I get the following error.
➜ ~/.vim/bundle/vim-geeknote/syntax master geeknote settings
Traceback (most recent call last):
File "/usr/local/bin/geeknote", line 9, in
However I am able to run geeknote within vim. Any suggestions on how to debug this. Again thank you very much.
Just trying to get this running in my vim, and when I run
vim -c Geeknote, I get:
I'm terribly bad at python -- would love to know what's going on. Thanks!
Great and SUPER useful project by the way!