I am on python 3.8.5 I am using python and pip, pipenv recently without any issue on any terminal and project. But, today when I try to do anything with pip or pipenv, I get this error
No Module Named "pip"
I even installed python latest version again and I know that on 3.8.5, I don't have to download pip. I can't even check the pip version in the terminal.
Type in sudo apt-get install python3-pip in the terminal to install pip
After upgrading my pip to version 10 using pip3 install --upgrade pip and above I cannot I want to install/upgrade PyPi packages using pip3 install PyPiPackageName as I get the following error:
from pip import main
ImportError: cannot import name main
I wonder how I can install PyPi packages using pip when I'm using new versions of pip? I've seen some people use pyhton3 to do this but doing python3 -m pip install --upgrade pip gave me the following error and I cannot upgrade pip to higher versions:
/usr/bin/python3: No module named pip
Before doing python3 -m pip install --upgrade pip I do python3 -m pip install -U pip and I get the following error:
/usr/bin/python3: No module named pip
So I'm confused on what I need to do to be able to upgrade or install PyPi packages.
In addition to executing the following:
curl https://bootstrap.pypa.io/get-pip.py | python3.6
I also had to make sure python3 is using Python 3.6 otherwise Python 3.5 is used (which does not come with pip by default). So I did the following and things work fine now:
ln -s /usr/bin/python3.6 /usr/local/bin/python3
I have installed python3.6 and Jupiter Notebooks on my computer using anaconda. Now, I need to install TensorFlow for python3. To show the version of pip: I type these command:
pip -V: pip 9.0.1 from /Users/xxx/anaconda3/lib/python3.6/site-packages (python 3.6).
pip3 -V: command not found.
What I understand is pip pointed to python3.6 and I can use it to install Tensorfolw (it is like a alias to pip3). Is it correct?
I have Python 2.7 installed (by default) and also a Python3.x. I installed anaconda later. When I use pip3, it uses the pip3 for Python3.x I guess. When I do which pip3 on terminal, it shows user/bin/pip3. But I want it to use pip3 from anaconda. How do I go about doing that?
Try this in the Anaconda prompt:
conda install pip3
If that doesn't work, in the same prompt try
pip install pip3
When I execute jupyter notebook in my virtual environment in Arch Linux, the following error occurred.
Error executing Jupyter command 'notebook': [Errno 2] No such file or directory
My Python version is 3.6, and my Jupyter version is 4.3.0
How can I resolve this issue?
It seems to me as though the installation has messed up somehow. Try running:
# For Python 2
pip install --upgrade --force-reinstall --no-cache-dir jupyter
# For Python 3
pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
This should reinstall everything from PyPi. This should solve the problem as I think running pip install "ipython[notebook]" messed things up.
For me the issue was that the command jupyter notebook changed to jupyter-notebook after installation.
If that doesn't work, try python -m notebook, and if it opens, close it, then
export PATH=$PATH:~/.local/bin/, then refresh your path by opening a new terminal, and try jupyter notebook again.
And finally, if that doesn't work, take a look at vim /usr/local/bin/jupyter-notebook, vim /usr/local/bin/jupyter, vim /usr/local/bin/jupyter-lab (if you have JupyterLab) and edit the #!python version at the top of the file to match the version of python you are trying to use. As an example, I installed Python 3.8.2 on my mac, but those files still had the path to the 3.6 version, so I edited it to #!/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
Try this command: python -m IPython notebook
Credits to the GitHub user Milannju who provided the solution here.
This worked for me. (Python 3.6 on Ubuntu 18.04 LTS)
export PATH=$PATH:~/.local/bin/
On Ubuntu 18.10, the following command helped me out.
sudo apt-get install jupyter-notebook
Jupyter installation is not working on Mac Os
To run the jupyter notebook:-> python -m notebook
Use the command below and if you are using pip3 replace pip by pip3
pip install --upgrade --force-reinstall jupyter
This worked for me.
Since both pip and pip3.6 was installed and
pip install --upgrade --force-reinstall jupyter
was failing, so I used
pip3.6 install --upgrade --force-reinstall jupyter
and it worked for me.
Running jupyter notebook also worked after this installation.
Deactivate your virtual environment if you are currently in;
Run following commands:
python -m pip install jupyter
jupyter notebook
For me the fix was simply running pip install notebook
Somehow the original Jupiter install got borked along the way.
I'm trying to get this going on VirtualBox on Ubuntu. Finally on some other post it said to try jupyter-notebook. I tried this and it told me to do sudo apt-get jupyter-notebook and that installed a bunch of stuff. Now if I type command jupyter-notebook, it works.
If you are on Fedora installing python3-notebook resolved my problem.
# dnf install python3-notebook