Unable to Run YouCompleteMe in neovim - vim

I use Manjaro (5.6.7 Kernel), I am trying to install YCM on neovim. I did it before, but it was vim, and I used vundle, this time I am using vim-plug. I get this message when I launch newvim.
YouCompleteMe unavailable: requires Vim compiled with Python (3.5.1+) support.
Thanks!

YouCompleteMe breaks so often, that I wrote down the steps to resurrect it:
1. Attempt reinstalling YCM:
$ python <DOTFILE_PATH>/vim/plugged/youcompleteme/install.py --clang-completer
2. Received the following error?
ERROR: found static Python library (/Users/USER/.pyenv/versions/3.7.2/lib/python3.7/config-3.7m-darwin/libpython3.7m.a) but a dynamic one is required.
Then:
$ export PYTHON_CONFIGURE_OPTS="--enable-framework"
$ pyenv install 3.7.2
3. If neovim throws error "[...] requires Vim compiled with Python (2.7.1+ or 3.4+) support" on start, then:
$ python3 -m pip install --user --upgrade pynvim
Replace 3.7.2 with your actual python3 version. No need to stick to an old version, just because I wrote this note a while back.

Related

"No module name adafruit_servokit"

I am working on Jetson Nano and trying to control servo motors. I am using PCA9685. I have installed all the pre-requisites for that
sudo pip3 install adafruit-circuitpython-servokit
Faced an error called
SyntaxError: future feature annotations is not defined
i updated python for that and the issue was resolved. Now the issue is that when i use python 3.8 as an interpreter in Visual studio i face the error
No module name adafruit_servokit
But when i use the python 3.6, the adafruit_servokit error is solved and the annotation error arises.
Looking forward to every suggestion. Thank you
This is because you have conflicting interpreters for your python installation.
Inside your Visual Studio terminal, try using:
python3.8 -m pip install adafruit-circuitpython-servokit
Using python -m pip install instead of just pip install is recommended. The reason is that it will use the correct interpreter for your python installation, specially if you have many versions installed. More details here: https://snarky.ca/why-you-should-use-python-m-pip/
---EDIT---
You should replace python3.8 with your target version number.

What’s the difference between python and python3

I’m following some instructions to configure my pc to coding some solidity sample projects and the instructions tell me to install pip and pipx, but first I need to check the version of Python installed. The instructions say to run this at the command prompt:
python3 --version
but when I do, I get the following error:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
However, if I run:
Python --version
It returns: Python 3.8.5
So when I’m instructed to run “python3” …. Is that an apple syntax where I would use just “python” for windows? I’ve googled this and could not find any clarification.
Thank you.
Often in reading instructions for installing things in Python, we see syntax like this:
python3 --version
but on my PC I get an error "Cannot find python3" even though I have python 3.7, 3.8 and 3.9 installed.
For me using this syntax worked:
python --version
python -m pip install --user pipx
python -m pipx ensurepath

How to Fix linter-Flake8 in atom for Python Configuration

Introduction
After I installed atom into my debian-ParrotOS for coding python. I've tried to search for flake8 for helping me to figure out the problems while writing code.
The Problem
after I installed linter-flake8 using this command: pip install flake8
It showed me that this line:
[Linter] Error running Flake8
See console for more info
What I've done
I tried several times to re-install linter-flake8. Even I tried to search multiple times for another alterative but all of them was not effcient as linter-flake8.
Fix Linter flake8
Description:
This's the solution for fixing the console problem which we're facing when we decide to install Linter-flake8 for Python3. It has been tested in Linux and Debian.
Why Linter-flake8 doesn't work after installation?
Linter-flake8 default installation meant to be for python 2.7 beside if you read the description of the package, you will also find that their implementation was for python 2.7 not for python3.
Default installation package simulates directly with python 2.7, not for python3. so, you have to install the package using the commands of python3.
Even after inserting your Executable PATH will be only mere of spectacular. Because you need to install flake8 in terms of python3, not python2.
So, What should I do?
Install Linter-flake8 From Atom and then restart your IDE.
Check if it's actually being installed via your package manager by executing: which flake8 in your terminal.
Reopen your IDE and click Ctrl+Shift+P to open the Search in Atom.
Search for Application: Open the Init Script.
Then, Write in the init.coffee this code:
process.env.PATH = ['usr/local/bin/', process.env.PATH].join(':')
Go To your *Executable PATH and paste this path /usr/local/bin/.
Then, open a new Terminal and execute these commands:
First, enter your root Mode by sudo su.
Second, go to cd /usr/local/bin/.
Third, execute these commands:
python3 -m pip install flake8.
ls
apm install linter-flake8
ls
python3 -m pip install flake8-docstring
python3 -m pip install hacking
If you didn't install pip before, then you can install it by sudo apt-get install pip and then, you can move on to continue the installation of flake8.
close your Atom and open it.
If you want to disable The Max Line Lenght you can do that by Default: 0.
Smile!
It will be a courtesy from you if you start following me :) <3
References:
flake8 not found
linter-flake8

Trouble installing using PIP

I'm having trouble importing plotly using pip install. The error I get is as follows:
The following command must be run outside of the IPython shell:
$ pip install plotly
The Python package manager (pip) can only be used from outside of IPython.
Please reissue the `pip` command in a separate terminal or command prompt.
I'm very new to programming, so I simply tried this in the windows command prompt and it said "pip is not recognized as an internal or external command, operable program, or batch file". I'm using Spyder if that helps, but I'm not sure what I'm missing here.
Thanks for your help.
I guess you forgot to put ! before pip.
try:
!pip install plotly
in your notebook, should work.
For windows the cleanest way to install a python package is to:
python -m pip install [packagename]
This removes the ambiguity if pip is added to the path variable or not.
If you are getting below error while installing any python packages in window using command "pip install packageName".
The following command must be run outside of the IPython shell:
$ pip install configobj
The Python package manager (pip) can only be used from outside of IPython.
Please reissue the `pip` command in a separate terminal or command prompt.
See the Python documentation for more information on how to install packages:
https://docs.python.org/3/installing/
solution: add "!" at beginning of pip
!pip install configobj(packageName)
It will work. It worked in my case.
What worked for me was going to the directory in which Spyder is located, which you can do by searching Spyder on your computer and then right clicking → directory, and then in the directory opening the Anaconda Prompt. In this Prompt you can type in:
pip install [packagename]
and it will work.

"Error: Tried to guess R's HOME but no R command in the PATH"

"Error: Tried to guess R's HOME but no R command in the PATH"
after runing [ rpy2-2.5.6]$ python setup.py install commands in my redhat server
Try to install libraries always with pip instead of messing around yourself with setup.py files.
I run into the same error under windows 8, R Version 3.3.1 and Python 2.7, 32bit. The solution is easy but for this case the normal pip install rpy2 does not work.
Instead try to use the Windows-Binaries you find them here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2. Download the suiting whl file for your configuration. Then go to your download folder in cmd and simply use:
pip install rpy2-2.7.8-cp27-none-win32.whl
Note, make sure you adapt this code to your download file.
I found out that this happens to me because I'm trying to install on a python version 2.6.5 and the setup.py script tries to use a method subprocess.check_output that is new on 2.7, hence it raises an exception that leads to the this message. It seems to be wise to use a 2.7 or later version, because the check_output method is used several times in the setup.py script.
This worked for me on my Mac using python 2.7:
In my ~/.profile (or use ~/.bashrc)
I set:
export R_HOME=/Library/Frameworks/R.framework/Versions/Current/Resources/
export PATH=$R_HOME:$PATH
sourced it (source ~/.profile) and then did the standard
pip install rpy2

Resources