neovim ale stops working when leaving conda's environment

Asked 2 years ago, Updated 2 years ago, 100 views

I wanted to use flake8 or jedi with neovim ale in conda environment, so I installed it using the following actions.

conda create-n neovim

conda install-conda-forge neovim

conda install-conda-forceflake8

conda install-conda-forge jedi

Add letg:python3_host_prog='path/to/miniconda3/envs/neovim/bin/python' to init.vim

However, if you leave the virtual environment neovim, you cannot lint Python in neovim.How can I lint outside of my virtual environment?

Below is the conda list of neovim virtual environments.

 ca-certificates 2018.10.15 ha4d7672_0conda-forge
certifi2018.10.15py36_1000conda-forge
flake83.6.0 py36_1000 conda-forge
greenlet 0.4.13 py36_0 conda-forge
jedi 0.13.1py36_1000conda-forge
libffi 3.2.1 hfc679d8_5conda-forge
libgcc-ng 7.2.0 hdf63c60_3conda-forge
libstdcxx-ng 7.2.0 hdf63c60_3conda-forge
mccabe 0.6.1py_1conda-forge
msgpack-python 0.5.6 py36h2d50403_3conda-forge
ncurses 6.1 hfc679d8_1conda-forge
neovim 0.3.0py36_0conda-forge
openssl 1.0.2ph470a237_1conda-forge
parso 0.3.1py_0conda-forge
pip18.1py36_1000conda-forge
picodestyle 2.4.0py_1conda-forge
pyflakes 2.0.0 py_0 conda-forge
python 3.6.6 h5001a0f_3conda-forge
readline 7.0 haaf1bffa_1conda-forge
setuptools40.5.0py36_0conda-forge
sqlite 3.25.3 hb1c47c0_0conda-forge
tk 8.6.8 ha92aebf_0conda-forge
wheel 0.32.2py36_0conda-forge
xz 5.2.4 h470a237_1conda-forge
zlib 1.2.11 h470a237_3conda-forge

python vim conda

2022-09-30 21:35

1 Answers

I'm a pyenv user, but I'm setting up a python relationship in the same way.

If you really set it up like this, I think the path to python is wrong.

The 'path/to/miniconda3/envs/neovim/bin/python' portion varies by environment.
See where conda puts python in your environment.

Enter the virtual environment neovim and hit which python with the command line to find out.


2022-09-30 21:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.