I have jupyter installed with python3.5 on my Mac OSX, but I want the python2.7 version. So, I basically need to uninstall the 3.5 version, and reinstall the 2.7 version.
But for some reason I can't uninstall the 3.5 version. I tried sudo python3 -m pip uninstall jupyter, and you can see the results below:
✔ ~/current/directory
20:08 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
✔ ~/current/directory
20:08 $ sudo python3 -m pip uninstall jupyter
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot uninstall requirement jupyter, not installed
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
✘-1 ~/current/directory
20:09 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
...as you can see above, the which jupyter command still returns a valid path, AND not only that. I'm still able to launch jupyter notebook from the command line, and it opens a notebook.
How do I correctly get rid of my existing version of jupyter ? OR, if someone knows how to ADD a python2 kernel to my existing jupyter, that would be fine too. Is that possible?
All I can think of is to manually kill the files and subfolders inside of /Library/Frameworks/Python.framework/Versions/3.5/bin/, but this seems unnecessarily brutal?
The answer over here solved my problem: https://stackoverflow.com/a/42277762/8057434
I'll just summarize what to do.
Run
conda uninstall notebook nbconvert nbformat ipykernel ipywidgets qtconsole traitlets tornado jupyter_* ipython_genutils jinja2 -y
in your terminal.
You can use pip uninstall instead of conda uninstall if you aren't using anaconda.
From your home folder, delete ~/AnacondaProjects. After that remove the export of Anaconda environment variable from your bash profile ~/.bashrc .
Use pip3 instead of pip
pip3 uninstall jupyter
You can install for both python 2 and python 3 on the same computer as long as you use the correct pip version
I have jupyter installed with python3.5 on my Mac OSX, but I want the python2.7 version.
Anaconda is a great way to install python software that you need for specific projects.
Download from https://www.continuum.io/downloads#macos
as said, bash Anaconda2-4.3.1-MacOSX-x86_64.sh (the 2.7 version in your case)
go to the installed directory and type source bin/activate
This creates a command-line environment which has just the right level of libraries etc. Inside, you can install further data with f.ex. conda install numpy. To fix a version, use conda install numpy=1.10.
You should uninstall the jupyter-core, jupyter-console, jupyter-client seperately. After remove them all, these is no package found named jupyter.
Related
I'm following this video to install Jupyter Notebook using Windows PowerShell. I entered the scripts folder and type .\pip install jupyter, and then it suggested uploading pip to version 20.1 first. Well, I typed python -m pip install --upgrade pip as suggested, but nothing happened. If I tried to install Jupyter Notebook again, it would just start a circle once again.
Things I have tried but don't work:
.\pip3 install jupyter as some other thread online says
doing all these in the Python folder (one level up)
python -m pip install -U pip, as suggested by the official webpage of installing pip
add Path to Windows as instructed by this blog
Why does this happen? Isn't what I get when installing Python 3.8 the lastest version of pip? How can I actually upload it to version 20.1 now?
BTW, this is what my Scripts directory looks like now:
After you change the Path variable and before you start python -m pip install -U pip you have to start a new shell.
It's because the Path you setup is not taken dynamicaly.
I'm using Python 3.6 on Pycharm venv (virtual environment provided by IDE)
Terminal kept telling me to upgrade my pip from old 10.0.1 to newer 18:
You are using pip version 10.0.1, however version 18.0 is available
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
So I upgraded my pip with the suggested command.
However, when I check my pip version by pip --version, it's still on 10.0.1 and pip keeps telling me to upgrade.
pip 10.0.1 from
h:\pycharmprojects\my_project\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip
(python 3.6)
I'm sure it's already up-to-date by checking IDE's interpreter settings.
I know it doesn't really matter but it bothers me pretty much.
I already tried closing and opening new terminal but that clearly doesn't work.
How do I use my newly installed pip? Is it just Pycharm's problem?
When you are using a virtual environment in pycharm, you update the version of pip inside that virtual environment.
If you want to upgrade pip outside of the venv, type
python -m pip install pip -U
Where python is how you start python from the terminal,
which may be python3 or py -3.6 depending on your operating system.
To install inside the virtual environment, you can activate
that inside the terminal and then type the above command.
If you run this command in your PyCharm terminal, it will resolve the warning about pip:
python -m pip install -U --force-reinstall pip
Here are some comments on the JetBrains community page
I have Jupyter Notebook installed and working. However it only has python 2 kernel.
I tried reinstalling Anaconda with Python 3.6 version of python, which worked fine (apart from deleting all my environments, etc.), but no change in relation to the kernels available for Jupyter.
I have tried installing jupyter using pip (the solution to this question), but I get the error message Requirement already satisfied: jupyter in c:\users\username\anaconda2\lib\site-packages
Any ideas?
Are you using pip3 install jupyter?
a more robust solution would be to isolate your environments with something like pipenv.
pip install pipenv
pipenv install --three
this will install a virtual environment with python3
install packages
pipenv install jupyter
activate the env
pipenv shell
start the notebook
jupyter notebook
You should be able to see the python3 option now.
I installed a copy of Anaconda to play around with, but decided I liked Homebrew better, so I removed it. However, this seems to have messed up my install of Jupyter Notebooks, as I can no longer access it. I reinstalled it with pip install jupyter and when I run pip show jupyter I get:
Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter#googlegroups.org
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: ipywidgets, nbconvert, notebook, jupyter-console, qtconsole, ipykernel
But when I run which -a jupyter I get nothing. I even tried uninstalling and installing python again via Homebrew and it still gives me the error, -bash: jupyter: command not found.
I have python installed correctly, which -a python gives:
/usr/local/bin/python
/usr/bin/python
Any ideas as to why it might not be working?
I'm on Mac and am using Zsh. For some reason, after I installed Python3, the following line:
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
was added to .zprofile instead of .zshrc.
I transferred the line to .zshrc and did source ~/.zshrc. That did the trick.
The below command seems to install only python files (under /usr/local/lib/python2.7/site-packages in your case):
pip install jupyter
You can run the jupyter as a Python's module like this:
python -m jupyter
To see all installed modules you can type the following command from the Python's shell:
help('modules')
As an alternative you can try to upgrade the package:
pip install --upgrade pip
pip install --upgrade jupyter
If you want to access the jupyter by simply typing jupyter in your shell then the path to the jupyter's binary file should be placed inside the PATH variable.
During the installation of Anaconda software the jupyter binary is placed under /usr/local/bin/jupyter (Ubuntu 14.04).
On Mac OS Mojave,
pip3 install jupyter
installs jupyter under
/Library/Frameworks/Python.framework/Versions/3.5/bin/
. Your version may be different from 3.5. You can then link to the binary there as follows.
ln -s /Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter /usr/local/bin/
In the rare case that /usr/local/bin/ is not on your PATH, you may replace it above with some folder that is.
python -m notebook
should do the trick
I want to install pyperclip from GitHub using pip install but unfortunately it's only installed to pip and not Anaconda. I'm using PyCharm and my interpreter is Anaconda. (Linux)
I want Anaconda to install the package 'pyperclip' as well so I can use it in PyCharm. I've try Googling but can't find any result.
From Anaconda's website, run the following in Terminal/cmd:
conda install -c conda-forge pyperclip
You need to make sure the following command uses the pip in your CONDA_FOLDER/Scripts/pip or CONDA_FOLDER/envs/ENVIRONMENT_NAME/Scripts/pip:
pip install git+https://github.com/asweigart/pyperclip.git
or if a specific branch (instead of the default one is needed) then use:
pip install git+https://github.com/asweigart/pyperclip.git#BRANCHNAME
However you need to make sure your PyCharm actually uses the environment in which you install the package! Otherwise there is no sense in installing it in the wrong one.
I am not sure because I am not running linux and I never tried it but according to the official website
run anaconda prompt
and then type: conda install -c auto pyperclip=1.3
for more info: https://anaconda.org/auto/pyperclip
To install pyperclip from conda run following command.
conda install -c bryanwweber pyperclip
I was having a hard time installing pyperclip on Anaconda Jupyter notebook. I installed pip and also upgraded it to the latest version. I followed your answers but didn't have luck.
If you're a Windows user, here's how I resolved:
1) Open Anaconda terminal (it's your Windows terminal inside Anaconda)
2)It will open showing the C drive and your username like: C:\Users\joe.jacob
3)C:\Users\joe.jacob\ dir (this will show you where you have Jupyter Notebook. Mine was at .jupyter, so I navigated to it using: cd .jupyter
C:\Users\joe.jacob\cd .jupyter
4)Now install pyperclip at your jupyter notebook like this:
C:\Users\joe.jacob\.jupyter>pip install pyperclip
5) It installs pyperclip package. Installing other pip packages is similar.
I hope this helps.
search for anaconda prompt on your computer and type one of the following
conda install -c conda-forge pyperclip
conda install -c "conda-forge/label/gcc7" pyperclip
conda install -c "conda-forge/label/cf201901" pyperclip
conda install -c "conda-forge/label/cf202003" pyperclip
then click enter and wait for it to download you can repeat it again to confirm whether its installed