-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trouble using the plugin #4
Comments
I have the same issue here! |
I had a similar issue, but am using vim-pathogen Found out I had my bundle directory setup incorrectly. first attempt
Inside vim you can run
As per the vim-sensible example .. I needed to add the
Which now allows the chatgpt plugin to be picked up.
|
My next issue was that my default MacOS vim does not have python3 available.
Which as per the start of the Checking the version of Vim .. shows indeed it does not have python3 support, see the minus sign next to python3 (-).
Followed this to install MacVim that has python3 support by default. Confirmed with
Then hit this starting vim
Running above commands inside vim showed different versions.
I assumed the version diff was the issue as I did not have 3.11.4 compiled on my Mac. |
Now have 3.11.4 installed on my MacOS
Confirmed in Vim commands line up as per above error output.
Have confirmed
Looks like the pyenv version is not being picked up by vim. wip .... |
I also encountered a similar issue when using pyenv. For your information, in my case, the problem was resolved by adding the following line to the .vimrc file (perhaps at the beginning of the file): set pythonthreehome=/Users/yokoyama/.pyenv/versions/3.9.11 Please note that the installed Python 3.9.11 includes the I hope this helps. Regards, |
I tried again and it works directly without issue! |
I set the following in my set pythonthreehome=/home/bksuperking/.pyenv/versions/3.11.4 This gave me the following error $ vim
Python path configuration:
PYTHONHOME = '/home/nathan/.pyenv/versions/3.11.4'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/home/nathan/.pyenv/shims/python3'
sys.base_prefix = '/home/nathan/.pyenv/versions/3.11.4'
sys.base_exec_prefix = '/home/nathan/.pyenv/versions/3.11.4'
sys.executable = '/home/nathan/.pyenv/shims/python3'
sys.prefix = '/home/nathan/.pyenv/versions/3.11.4'
sys.exec_prefix = '/home/nathan/.pyenv/versions/3.11.4'
sys.path = [
'/home/nathan/.pyenv/versions/3.11.4/lib/python38.zip',
'/home/nathan/.pyenv/versions/3.11.4/lib/python3.8',
'/home/nathan/.pyenv/versions/3.11.4/lib/python3.8/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
It seems vim is forcing the python version by appending it to the paths in My fix was to install the version vim listed using $ pyenv install 3.8.10
$ pyenv global 3.8.10
$ pip install openai and also set the path in set pythonthreehome=/home/bksuperking/.pyenv/versions/3.8.10 |
Hi guys, Main points, requirements using this plugin.
Okay, let's check and install. Step 1. Install vim with Python3 support.You can check if your vim supports python3.
If minus "-" exists before "pyhton3", the vim does not support unfortunately. for Mac, use Homebrew's vim. It links python3 by default.
Reload terminal session
Check vim path.
Check again.
Can you find Step 2. Find linked Python.And You can also find Linking information like...
This means the vim links Homebrew's python3 (version 3.11).
Step 3. Install openai module in python linked vim.Only for example.
Step 4. Try ChatGPTJust try!
|
Something about newer pythons makes installation this way impossible. see https://peps.python.org/pep-0668/
|
I rebuilt a version of vim with python 3.11 and its working now. |
I made a simple PR for vim 9 and python 3.12 and openai 1.0.0 .. someone else did so as well 2 days ago (and I didn't notice before I made my changes). #30 |
Worked great, thanks. The only challenge was that the proxy behind I was sitting leads to the failure |
Hi, I have followed the instructions to install the plugin on my macOS. I have copied the
chatgpt.vim
file into~/.vim/plugged/vim-chatgpt MacBook-Air@Momo: cs plugin/ total 8 -rw-r--r-- 1 Momo 5101 Apr 7 14:03 chatgpt.vim
Also, I have edited my
.vimrc
file including the path foropenai
executablebut when I run
nvim
to ask something I get the errorIt seems I don't have activated this plugin. However, I have in my
.vimrc
so I don't know what I am losing
The text was updated successfully, but these errors were encountered: