python 3.8.12 installed by pyevn seems working as expected, but numpy installed using pip cannot be imported.
pip --list ran in Jupiter notebook shows the package has been installed already.
So as per the path you stated in your comment (reply), execute this command:
/usr/local/opt/python#3.9/bin/python3.9 -m pip install pandas
Related
I have installed tensorflow in a virtual environment and can import Tensorflow in jupyter notebook or terminal. I am now learning to use VScode, so I try to launch it in the jupyter notebook within the VScode, but Tensorflow cannot be imported.
It shows ModuleNotFoundError: No module named 'tensorflow', but I have installed it and it can be used in the terminal or jupyternotebook.
I also tried to define the path of the python interpreter, but it did not work. Could someone help me out? Tons of thanks.
Try:
This works for me.
pip --version
python -m pip install --upgrade pip
pip3 install tensorflow==2.0.0
pip --version
python -m pip install --upgrade pip
pip3 install tensorflow==2.8.0
Worked for me.
I have installed sqlalchemy in venv. It works in VSCode but I need to use it in Jupyter Notebook and is not working. When I attempt to install it in the notebook a message is shown saying the requirement has already been satisfied.
I have installed flask-sqlalchemy as I saw some people advised but this one is not recognized too.
I have also restarted the kernel but it did not work.
I was able to finally run it but I had to install ipykernel in the virtual environment:
python -m pip install ipykernel
python -m ipykernel install --user
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 trying to import matplotlib to python 3.7, but I keep getting
ModuleNotFoundError: No module named 'matplotlib'
despite the fact that I downloaded it in my Anaconda Prompt (Anaconda3) using
python -m pip install -U pip
python -m pip install -U matplotlib
What am I doing wrong here? And how get I get matplotlib
You are using Python 3.7, so the Python packages need to be compatible with Python 3.x, not Python 2.x. Run the following commands.
python3 -m pip install -U pip
Print the pip3 version to verify the installation:
pip3 --version
Install matplotlib:
pip3 install -U matplotlib
first install pip via get-pip.
Then install matplotlib by this command pip install matplotlib
NOTE:type all these commands first in powershell or cmd and then try it on your IDE's console.
NOTE2: In case you don't know how to download get-pip, simply right-click and click on save as.... button once after you clicked on the link included above, and then save it in your Desktop, Then go to powershell using cd C:/Users/(You'r username)/Desktop and then run python get-pip.py command, when you made sure that pip is fully installed in powershell or cmd, then you can install it in your IDE's console for once and then run pip install matplotlib or python -m pip install -U pip
python -m pip install -U matplotlib as you suggested.
NOTE3:I Guess if all what I said above possibly may not work, you must uninstall python and reinstall it again, But with one difference, YOU MUST enable python add to path at the beginning of installation so that all what I said above works for you flawlessly
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