I was unable to simply pip install pandas because my system already had it installed for python3. But I expected that pip would attempt to install for python2; pip3 should install for python3.
Why do I have to specify the python2 interpreter to use pip?
➜ ~ pip install pandas
Requirement already satisfied: pandas in /usr/local/lib/python3.5/site-packages
Requirement already satisfied: numpy>=1.7.0 in /usr/local/lib/python3.5/site-packages (from pandas)
➜ ~ python2 -m pip install pandas
Collecting pandas
Downloading pandas-0.19.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (11.9MB)
...
pip will call the pip that is in the default version of python on your system. It is not specific to python2. Since python3 is default on your system you need to specify python2 -m pip to access the python2 version.
Related
Python 3.9.5 Here I go:
deactivate
rm -rf venv/
python -m venv venv
source venv/bin/activate
python -V
python -m pip install --upgrade pip
python -m pip install wheel
fine.
look at the development.txt:
mariadb==1.0.5
python-binance==1.0.10
python-decouple==3.3
PyMySQL==0.10.1
mplfinance==0.12.7a4
newtulipy==0.4.6
autobahn==21.3.1
PyQt6==6.1.1
pyqtgraph==0.12.1
PyOpenGL==3.1.5
PyDispatcher-2.0.5
shortuuid==1.0.1
try this: development.txt (has is PyDispatcher==2.0.5).
Try this for your self:
python -m pip install -r requirements/development.txt
ERROR: Could not find a version that satisfies the requirement PyDispatcher-2.0.5 (from versions: none)
ERROR: No matching distribution found for PyDispatcher-2.0.5
Why?
But on his own:
pip install PyDispatcher
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyDispatcher in /home/jonsl/.local/lib/python3.9/site-packages (2.0.5)
Is fine.
Why?
Thank you people.
Turns out that:
pyqtgraph==0.12.1
needs
pyqtgraph==0.12.2
instead with:
PyQt6==6.1.1
Also, never use from ... import ... unless you need.
Python 3.9.5 Here I go:
deactivate
rm -rf venv/
python -m venv venv
source venv/bin/activate
python -V
python -m pip install --upgrade pip
python -m pip install wheel
fine.
look at the development.txt:
mariadb==1.0.5
python-binance==1.0.10
python-decouple==3.3
PyMySQL==0.10.1
mplfinance==0.12.7a4
newtulipy==0.4.6
autobahn==21.3.1
PyQt6==6.1.1
pyqtgraph==0.12.1
PyOpenGL==3.1.5
PyDispatcher-2.0.5
shortuuid==1.0.1
try this: development.txt (has is PyDispatcher==2.0.5).
Try this for your self:
python -m pip install -r requirements/development.txt
ERROR: Could not find a version that satisfies the requirement PyDispatcher-2.0.5 (from versions: none)
ERROR: No matching distribution found for PyDispatcher-2.0.5
Why?
But on his own:
pip install PyDispatcher
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyDispatcher in /home/jonsl/.local/lib/python3.9/site-packages (2.0.5)
Is fine.
Why?
Thank you people.
Turns out that:
pyqtgraph==0.12.1
needs
pyqtgraph==0.12.2
instead with:
PyQt6==6.1.1
Also, never use from ... import ... unless you need.
How can I fix this issue? This makes no sense, i guess i have two different python path so python gets confused how can i fix this issue as well?
C:\Users\user>pip install pip
Requirement already satisfied: pip in c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages (19.3.1)
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\user>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (20.0.2)
You have 2 different versions of Python (hence 2 different versions of pip) installed.
pip in c:\users\user\appdata\local\programs\python\python38-32
and
pip in c:\users\user\appdata\local\programs\python\python37-32
In the first example you did pip install pip but in the second python -m pip install --upgrade pip (The help text gave you a bad advice in this case).
If you want to upgrade the Python 3.8 pip, do pip install --upgrade pip or with the full path c:\users\kayra\appdata\local\programs\python\python38-32\python.exe -m pip install --upgrade pip.
So i really don't know what to do. I am confused. I am also using a virtual environment named PyCharm. There are many issues with pip there but I haven't seen anything as weird as this.
cmd output:
C:\Users\Artur\PycharmProjects\first\venv\Scripts>pip install time
Collecting time
Could not find a version that satisfies the requirement time (from versions: )
No matching distribution found for time
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\Artur\PycharmProjects\first\venv\Scripts>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\artur\pycharmprojects\first\venv\lib\site-packages (19.0.1)
C:\Users\Artur\PycharmProjects\first\venv\Scripts>pip install time
Collecting time
Could not find a version that satisfies the requirement time (from versions: )
No matching distribution found for time
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
To resolving your outdated pip in PyCharm by running this in your PyCharm terminal:
python -m pip install -U --force-reinstall pip
This will fix the warning you are receiving...You are using pip version 10.0.1, however version 19.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I am trying to setup virtualenv to keep my python env clean and organized.
Well, actually I'm trying to install scrapy as I wrote about here which opened this can of python worms that I'm now trying cleanup after will virtualenv.
The final verdict was to install virtualenv (which is failing) and hence this post. This is where I'm at:
$ virtualenv test
-bash: virtualenv: command not found
I understand that this means wherever virtualenv installed via pip install virtualenv isn't in my path but it should be after following these:
Can't pip install virtualenv in OS X 10.8 with brewed python 2.7
http://hackercodex.com/guide/python-development-environment-on-mac-osx/
https://github.com/Homebrew/homebrew/issues/12667#issuecomment-6257342
http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/
Delete all virtualenv and start from scratch
brew doctor returns ready to brew.
My guess is that my system python and my brew python aren't playing nicely but I'm out of ideas as to what else I can do to fix this.
At this point I'm willing to do a clean install of just about everything (even mac os x) if that's what it takes. I'm pretty sure I sudo pip install'd something(s) a while ago and I'm paying the price for it now.
More details of the install:
~ ∮ pip install virtualenv
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages
Cleaning up...
~ ∮ pip install virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Cleaning up...
I tried both
brew install python --with-brewed-openssl AND brew install python --framework (after uninstalling the previous when it wasn't working) (and all the other suggestions in the above links)
thanks in advance!
virtualenv looks to be in the wrong place. On Mac 10.9 it should be in /usr/local/bin/virtualenv.
Try a pip uninstall on virtualenv and then reinstall again with pip, see if it puts it in the right location.