Getting error while saving python file: There is no Pip installer available in the selected environment
You obviously have installed multiple Python environments on your system. The one in /usr/bin
is usually the one installed by your system's package manager (apt
on Debian) and most probably the default one that is used if you just call the python commands without absolute path from your shell. You can verify that by calling:
which python3
which pip3
I assume that both binaries are used from /usr/bin/
.
Your Python installation selected in VS code is located in /usr/local/bin
, which probably has been installed from a different origin (maybe you have compiled Python from source?). If VS code complains that no pip
has been found in your selected environment, probably /usr/local/bin/pip3
does not exist for some reason. You can verify that by calling:
ls /usr/local/bin/pip3
Easiest solution to this would be to select the /usr/bin/python3
environment in VS code.
If you really need the Python version from /usr/local/bin
, find out where this installation came from and complete it in order to have pip3
there as well.
The most sustainable solution, however, would be to use a virtual environment. This would make your Python version system-independent and you have full control over the packages in there.
Install pip3 and flake8 in conda venv on VS Code
I suggest you create a conda environment properly:
conda create -n "myenv" python
then, activate the environment:
conda activate myenv
finally, install flake:
pip install flake8
How to use pip with Visual Studio Code
I am pretty sure your problems of VSCode not finding the correct version of Python will be resolved if you add your ( Python 3.6 installation ) location to the system path.
Related Topics
Collect_List by Preserving Order Based on Another Variable
Filtering Dataframe Using the Length of a Column
How to Extract Address from Raw Text Using Nltk in Python
Vscode: There Is No Pip Installer Available in the Selected Environment
How to Replace Negative Numbers in Pandas Data Frame by Zero
Shifting the Elements of an Array in Python
Pandas Open_Excel() Fails With Xlrd.Biffh.Xlrderror: Can't Find Workbook in Ole2 Compound Document
Running Command With Paramiko Exec_Command Causes Process to Sleep Before Finishing
Get Absolute Paths of All Files in a Directory
How to Deal With Certificates Using Selenium
Missing 1 Required Positional Argument - Issue
Pandas Fill in Missing Date Within Each Group With Information in the Previous Row
String Concatenate Typeerror: Can Only Concatenate Str (Not "Int") to Str"
Replace Single Quote to Double Quote Python Pandas Dataframe
Heroku: No Default Language Could Be Detected for This App
Python: Assign Labels to Values in an Array
Replace Values of a Numpy Index Array With Values of a List
Find First Non-Zero Value in Each Column of Pandas Dataframe