I'm trying to run a package I installed with pip from command line. (this one, not that it matters)
I try to run a package with either:
python -m pip yawsso
ERROR: unknown command "yawsso"
or just calling it in the command line:
> yawsso
zsh: command not found: yawsso
I then check to see if it's installed properly, and it is
> pip list
Package Version
---------------- -------
pip 21.2.4
(...)
yawsso 0.7.1
> pip install yawsso
Requirement already satisfied: yawsso in /Users/<user>/Library/Python/3.9/lib/python/site-packages (0.7.1)
What's going on?
EDIT: As I mentioned. I have already tried installing it and it says the requirement is met:
> python -m pip install yawsso
Requirement already satisfied: yawsso in /Users/federico.esteban/Library/Python/3.9/lib/python/site-packages (0.7.1)
For Modern macos/OSX, you need to find your ~/Library/Python/$version/bin directory and add it to your $PATH.
I added this line to my .zshrc
export PATH=$HOME/Library/Python/3.9/bin:$PATH
After this my yawsso is working correctly.
Dont leave out install , the correct command is python -m pip install yawsso
Related
I am checking the documentation and there are basically two ways to install pip.
python -m ensurepip --upgrade
Looking in links: /var/folders/d0/gnksqzwn2fn46fjgrkp6045c0000gn/T/tmpe2ll6upv
Requirement already satisfied: setuptools in /Applications/Anaconda/anaconda3/lib/python3.9/site-packages (58.0.4)
Requirement already satisfied: pip in /Applications/Anaconda/anaconda3/lib/python3.9/site-packages
All the packages are in /Applications/Anaconda/anaconda3/lib/python3.9/site-packages directory including pip.
However, when I run pip list from base environment, I get:
-bash: pip: command not found
I am getting module not found error when running my application.
My application was running fine until I tried to upgrade a python package. What did I mess up? What do I need to check?
Try this python -m pip list instead of python pip list
It could be that pip might not be installed or it could be the version of the pip might not be compatible with the current version.
pip used for python2, use pip3 for python3 and upgrade your pip and retry once.
python -m pip install --upgrade pip
I'm trying to install requirements.txt in pycharm, but pip version indicated version 9.0.3 whereas I have 19.3.1. It will not update saying that requirement is already satisfied.
I've tried upgrading it but it says requirement already satisfied
You are using pip version 9.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
:\Users\User\Documents\Learn\Python\photography>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\user\documents\learn\python\photography\venv\lib\site-packages (19.3.1)
Do you have two versions of Python installed? That could be the cause.
Your terminal has photography\venv activated
I'm guessing Pycharm is not using that virtualenv
Regardless, the version of pip shouldn't stop you from using a requirements file
Win10, x64, Anaconda Python 3.7
I have recently 'upgraded' to Python 3.7 so some of my modules are missing, for example I am trying to use pyfile by using import plyfile but I get following error,
ModuleNotFoundError: No module named 'plyfile'
Ok simple fix I'll pip install plyfile
(base) PS C:\WINDOWS\system32> pip install plyfile
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: plyfile in c:\programdata\anaconda2\lib\site-packages (0.5)
Requirement already satisfied: numpy>=1.8 in c:\programdata\anaconda2\lib\site-packages (from plyfile) (1.16.3)
Ahh OK its not installed for py3.7 I'll pip3 install plyfile
(base) PS C:\WINDOWS\system32> pip3 install plyfile
Fatal error in launcher: Unable to create process using '"'
errrr ok pip3 --version
(base) PS C:\WINDOWS\system32> pip3 --version
Fatal error in launcher: Unable to create process using '"'
So I had a look around SO for previous posts & there are a few & honestly after reading them I dont get what's going on.
So whats going on? Am I right to use pip3 & its just badly installed or is there something deeper about the differences between the pips I'm not getting?
Edit 1: pip install --upgrade pip makes no difference
Edit 2:
(base) PS C:\WINDOWS\system32> python --version
Python 3.7.3
(base) PS C:\WINDOWS\system32> pip --version
pip 19.1.1 from c:\programdata\anaconda2\lib\site-packages\pip (python 2.7)
Edit 3:
(base) PS C:\WINDOWS\system32> python -m pip install -U pip
D:\ProgramData\Anaconda3\python.exe: No module named pip
Solution:
Downloaded get-pip.py
Then from the terminal python get-pip.py --ignore-installed
Successful installation & upgrade,
(base) PS D:\Downloads> pip --version
pip 19.1.1 from d:\programdata\anaconda3\lib\site-packages\pip (python 3.7)
pip install plyfile collected & installed plyfile & now import plyfile works
Solution from pip's git page issue #1892 How do you remove pip from a pc if you installed by "get-pip.py"
I have got a problem when I want to install a specific version of a python library since I updated pip to 10.0.0. I would like to install it back but I cant find it, so I am forced to use the whole command , but it doesnt let me to install specific version of python package, any idea how to do it ?
C:\Windows\system32>python -m pip install APScheduler==3.0.0
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install pip APScheduler==3.0.0
Requirement already satisfied: pip in c:\program files (x86)\python36-32\lib\site-packages (10.0.0)
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install APScheduler==3.0.0
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install pymongo
Collecting pymongo
Downloading https://files.pythonhosted.org/packages/c2/96/00951e252c6cad023b3fd60457b2ab1c1329073516086c7ac1b6833a439e/pymongo-3.6.1-cp36-cp36m-win32.whl (286kB)
100% |████████████████████████████████| 286kB 1.3MB/s
Installing collected packages: pymongo
Successfully installed pymongo-3.6.1
also this is the part of a pip error I am dealing with , so any help would be awesome ^.^ ( Tried few things from stack overflow but neighter of them worked )
C:\Windows\system32>pip install APScheduler==3.0.0
Fatal error in launcher: Unable to create process using '""c:\program files (x86)\python36-32\python.exe" "C:\Program Files (x86)\Python36-32\Scripts\pip.exe" install APScheduler==3.0.0'
Try using the --upgrade flag.
python -m pip install --upgrade APScheduler==3.0.0
It should work for downgrades as well
Make sure that both python.exe and pip are available in the locations in which it is looking for them. The pip launcher program is failing to run the command that it's printing in the error, which is probably because it can't find the relevant files.
Alternatively, just run pip using python -m pip which seems to work fine.
When I run:
sudo -H pip install finsymbols
I get the below response:
Requirement already satisfied: finsymbols in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: beautifulsoup4>=4.2.1 in /usr/local/lib/python2.7/dist-packages (from finsymbols)
then when I run
$ python
>>> from finsymbols import symbols
I get
File "", line 1, in
ImportError: No module named finsymbols
My question is, why am I getting the error when the module is installed?
You may have multiple versions of Python.
Requirement already satisfied: finsymbols in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: beautifulsoup4>=4.2.1 in /usr/local/lib/python2.7/dist-packages (from finsymbols)
Pip has installed it in python2.7 path. Your default Python may be different.
So try using
$ python2.7
instead of
$ python
If you want to install a module that runs on Python 3.x, you need to use
pip3 install module_name
Or link the pip3 executable in /usr/bin to replace pip. In this way, you can use pip to install Python 3.x modules.
Here I strongly recommend to use virtualenv to manage your Python module environments. More details can be found here.
Thanks jonatan, that worked.
I ran
pip install finsymbols
not
sudo -H pip install finsymbols
and that fixed the issue