Skip to content
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

WSL Ubuntu Python Path - not working [Aider works in zsh terminal but not with this extension] #39

Closed
hamburger-fries opened this issue Nov 30, 2024 · 4 comments

Comments

@hamburger-fries
Copy link

hamburger-fries commented Nov 30, 2024

NOTE: Aider works in ZSH terminal on Ubuntu. It works in the terminal in Visual Studio Code. But the Aider.Composer Extension is not working.

I have tried the following paths for the Python Path.
vscode://settings/aider-composer.pythonPath'

  • /usr/bin/python3
  • /bin/python3
  • /usr/bin/python3.12
  • /usr/local/bin/python3
  • ~/.local/bin/python3

I believe the correct path should be: /usr/bin/python3.12

image

I have also tried the alternative method of setting up a virtual env.

  1. python3 -m venv env
  2. source env/bin/activate
  3. pip install aider-chat flask

and last

I also tried

  • code --uninstall-extension lee2py.aider-composer && code --install-extension lee2py.aider-composer
  • Uninstalling lee2py.aider-composer...
  • Extension 'lee2py.aider-composer' was successfully uninstalled from WSL: Ubuntu-24.04!
  • Installing extensions on WSL: Ubuntu-24.04...
  • Installing extension 'lee2py.aider-composer'...
  • Extension 'lee2py.aider-composer' v1.3.5 was successfully installed.
@lee88688
Copy link
Owner

lee88688 commented Dec 1, 2024

this need to start a server in the extension host. if use WSL, extension may not connect the server in the WSL?
when start a server in the WSL and listen to 127.0.0.1, the windows host can connect this server by 127.0.0.1?

@eddieai
Copy link

eddieai commented Dec 4, 2024

this need to start a server in the extension host. if use WSL, extension may not connect the server in the WSL? when start a server in the WSL and listen to 127.0.0.1, the windows host can connect this server by 127.0.0.1?

Hi @lee88688, thanks for the great work.
I'm also using WSL on windows, I have the same issue.

Windows can NOT connect a server running on WSL by 127.0.0.1, it's another address.
For example, mine is 192.168.65.101
I get this address by running "ip a" command inside my WSL.

I hope this can help you to make aider-composer work in WSL

@lee88688
Copy link
Owner

lee88688 commented Dec 5, 2024

I am not sure if the official has provided relevant APIs for forwarding the host's port. so that I can use it to auto redirect the aider's server port.
by the way, @eddieai do you install the python and relative packages(aider-chat, flask) in WSL, and the python path is also in WSL's path.

@eddieai
Copy link

eddieai commented Dec 5, 2024

I am not sure if the official has provided relevant APIs for forwarding the host's port. so that I can use it to auto redirect the aider's server port. by the way, @eddieai do you install the python and relative packages(aider-chat, flask) in WSL, and the python path is also in WSL's path.

I just forgot to pip install flask in my WSL python environment (I only installed aider-chat). After installing that and having set the aider-composer python path to the correct WSL python environment, all works well in VS Code WSL.

Thanks! We can close this issue IMO

@lee88688 lee88688 closed this as completed Dec 6, 2024
@lee88688 lee88688 pinned this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants