So this is what I've tried to do in Windows 10 cmd
C:\Users\lewis>pip install pandas
Collecting pandas
Downloading pandas-1.4.1-cp310-cp310-win_amd64.whl (10.6 MB)
---------------------------------------- 10.6/10.6 MB 8.2 MB/s eta 0:00:00
Collecting pytz>=2020.1
Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
---------------------------------------- 503.5/503.5 KB 8.0 MB/s eta 0:00:00
Collecting numpy>=1.21.0
Downloading numpy-1.22.3-cp310-cp310-win_amd64.whl (14.7 MB)
---------------------------------------- 14.7/14.7 MB 8.5 MB/s eta 0:00:00
Collecting python-dateutil>=2.8.1
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
---------------------------------------- 247.7/247.7 KB 5.1 MB/s eta 0:00:00
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, six, numpy, python-dateutil, pandas
Successfully installed numpy-1.22.3 pandas-1.4.1 python-dateutil-2.8.2 pytz-2022.1 six 1.16.0'
So the module I wanted seems to have succesfully installed before I was prompted with this message.
WARNING: You are using pip version 22.0.3; however, version 22.0.4 is available.
You should consider upgrading via the
'C:\Users\lewis\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.'
So my pip is out of date woop! So I proceed to upgrade the pip.
C:\Users\lewis>pip install --upgrade pip
Requirement already satisfied: pip in
c:\users\lewis\appdata\local\programs\python\python310\lib\site-packages (22.0.3)
Collecting pip
Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 6.4 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.3
Uninstalling pip-22.0.3:
Successfully uninstalled pip-22.0.3
Then this is where it all goes wrong.
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied:
'C:\\Users\\lewis\\AppData\\Local\\Temp\\pip-uninstall-un6fh2sa\\pip.exe'
Consider using the `--user` option or check the permissions.
So it doesn't reainstall a new version of pip so I'm left with nothing.
But it does still retrieve a version of pip from a file.
C:\Users\lewis>pip --version
pip 22.0.4 from C:\Users\lewis\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
What's happened here and how do I fix it. Not really that advanced on pip stuff. Thanks!
Is everything ok, you have numpy and pip installed and if you want to upgrade pip, just use the --user flag as is said in your own post:
pip install --upgrade --user pip
Related
I had to reset my machine recently, and so have to re-install everything again.
I want to run a Python file using PyTest.
Bash Terminal:
me#PF2DCSXD:/mnt/c/Users/dabell/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ pytest -s test_composite_key.py
Command 'pytest' not found, but can be installed with:
sudo apt install python-pytest
me#PF2DCSXD:/mnt/c/Users/dabell/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ sudo apt install python-pytest
[sudo] password for danielbellhv:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pytest
I was able to install pip, following this post's Solution.
Please let me know if there is anything else I can add to post.
I had to first install pip, as here:
sudo apt-get update
sudo apt-get upgrade #Optional
sudo apt install python3-pip
Then
$ pip install pytest
Collecting pytest
Downloading pytest-6.2.5-py3-none-any.whl (280 kB)
|████████████████████████████████| 280 kB 621 kB/s
Collecting packaging
Downloading packaging-21.2-py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 1.1 MB/s
Collecting iniconfig
Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting pluggy<2.0,>=0.12
Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting py>=1.8.2
Downloading py-1.10.0-py2.py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 1.1 MB/s
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: attrs>=19.2.0 in /usr/lib/python3/dist-packages (from pytest) (19.3.0)
Collecting pyparsing<3,>=2.0.2
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 1.1 MB/s
Installing collected packages: pyparsing, packaging, iniconfig, pluggy, py, toml, pytest
WARNING: The scripts py.test and pytest are installed in '/home/danielbellhv/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed iniconfig-1.1.1 packaging-21.2 pluggy-1.0.0 py-1.10.0 pyparsing-2.4.7 pytest-6.2.5 toml-0.10.2
Note:
$ pip install python-pytest
ERROR: Could not find a version that satisfies the requirement python-pytest (from versions: none)
ERROR: No matching distribution found for python-pytest
I am trying to install the package "grammar" whose dependencies include the packages "vineyard" and "Graphviz". I am using Pycharm, and I was able to install Graphviz without any issues.
However, while installing packages "grammar" and "vineyard", I am getting the below error:
C:\<mylib>>pip install grammar
Collecting grammar
Using cached https://files.pythonhosted.org/packages/7f/a3/4e712822d562faea9ec03f9181e53cf9dec0f4bebb1a19fceec6d3f51089/grammar-1.6-py3-none-any.whl
Collecting vineyard (from grammar)
Could not find a version that satisfies the requirement vineyard (from grammar) (from versions: )
No matching distribution found for vineyard (from grammar)
and
ERROR: Could not find a version that satisfies the requirement vineyard (from versions: none)
When i try and install using the below command:
pip install C:/<mylib>/vineyard_io-0.2.7-py3-none-any.whl
i get the below error:
Processing c:<mylib>\vineyard_io-0.2.7-py3-none-any.whl
Collecting oss2
Downloading oss2-2.15.0.tar.gz (226 kB)
|████████████████████████████████| 226 kB 544 kB/s
Collecting pyorc
Downloading pyorc-0.4.0-cp39-cp39-win_amd64.whl (765 kB)
|████████████████████████████████| 765 kB 273 kB/s
Collecting s3fs
Using cached s3fs-2021.8.0-py3-none-any.whl (26 kB)
Collecting pyarrow
Downloading pyarrow-5.0.0-cp39-cp39-win_amd64.whl (14.5 MB)
|████████████████████████████████| 14.5 MB 159 kB/s
Collecting hdfs3
Downloading hdfs3-0.3.1.tar.gz (44 kB)
|████████████████████████████████| 44 kB 409 kB/s
ERROR: Could not find a version that satisfies the requirement vineyard==0.2.7 (from vineyard-io) (from versions: none)
ERROR: No matching distribution found for vineyard==0.2.7
I am using python version 3.9.
I think you should be using pip3 instead of pip, since your python version is 3.x.
pip3 install C:/<mylib>/vineyard_io-0.2.7-py3-none-any.wh
Please, tell me if this has worked for you. I downloaded your wheel and installed the wheel using the same python version as you, but using pip3 instead of pip.
The issue was resolved after downgrading the python version to 3.8 from 3.9.
I was able to install vineyard and then grammar after that without any issues.
pip install C:/<mylib>/vineyard_io-0.2.7-py3-none-any.whl
I got the following error when trying to install boto3 from python on my mac
pip3 install boto
Looking in indexes: https://pypi.org
ERROR: Could not find a version that satisfies the requirement boto (from versions: none)
ERROR: No matching distribution found for boto
When I check on PyPi.org, I see results for boto3 package.
Any reason why this error comes up?
Any other index/option I could use?
I tried downloading the package from github and then installing it from source, but faced the same issue when installing one of the dependencies in boto3/requirements.txt.
I was able to resolve this using a different index by using the --extra-index-url flag.
pip3 install --extra-index-url https://pypi.python.org/simple boto3
Looking in indexes: https://pypi.org, https://pypi.python.org/simple
Collecting boto3
Downloading boto3-1.17.28-py2.py3-none-any.whl (131 kB)
|████████████████████████████████| 131 kB 1.1 MB/s
Collecting s3transfer<0.4.0,>=0.3.0
Downloading s3transfer-0.3.4-py2.py3-none-any.whl (69 kB)
|████████████████████████████████| 69 kB 2.1 MB/s
Collecting botocore<1.21.0,>=1.20.28
Downloading botocore-1.20.28-py2.py3-none-any.whl (7.3 MB)
|████████████████████████████████| 7.3 MB 4.9 MB/s
Collecting jmespath<1.0.0,>=0.7.1
Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting urllib3<1.27,>=1.25.4
Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
|████████████████████████████████| 153 kB 3.9 MB/s
Collecting python-dateutil<3.0.0,>=2.1
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 2.3 MB/s
Collecting six>=1.5
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: urllib3, jmespath, six, python-dateutil, botocore, s3transfer, boto3
Successfully installed boto3-1.17.28 botocore-1.20.28 jmespath-0.10.0 python-dateutil-2.8.1 s3transfer-0.3.4 six-1.15.0 urllib3-1.26.4
As per official documentation to install boto3 run the following command:
pip install boto3
not pip install boto
Ref: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#install-boto3
For me, it was resolved after adding --upgrade.
Final command: pip3 install boto3 --upgrade
Before :
$pip3 install boto3
Collecting boto3
Using cached boto3-1.21.7-py3-none-any.whl (132 kB)
ERROR: Could not find a version that satisfies the requirement botocore<1.25.0,>=1.24.7 (from boto3) (from versions: none)
ERROR: No matching distribution found for botocore<1.25.0,>=1.24.7 (from boto3)
So I'm trying to install the PyQt package so I just did this on my Anaconda Prompt:
C:\Users\USER>pip install PyQt5
Collecting PyQt5
Using cached PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-none-win_amd64.whl (64.5 MB)
Collecting PyQt5-sip<13,>=12.8
Using cached PyQt5_sip-12.8.0-cp37-cp37m-win_amd64.whl (62 kB)
ERROR: spyder 4.1.4 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
ERROR: spyder 4.1.4 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.15.0 which is incompatible.
So I tried a different version with:
pip install --upgrade --user pyqt5==5.12
And then this happened:
Collecting pyqt5==5.12
Downloading PyQt5-5.12-5.12.1_a-cp35.cp36.cp37.cp38-none-win_amd64.whl (49.4 MB)
|████████████████████████████████| 49.4 MB 43 kB/s
Collecting PyQt5_sip<4.20,>=4.19.14
Downloading PyQt5_sip-4.19.19-cp37-none-win_amd64.whl (52 kB)
|████████████████████████████████| 52 kB 3.8 MB/s
ERROR: spyder 4.1.4 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
To install these with our errors try this.
Try installing pyqtwebengine version 5.12 and then install pyqt5 version 5.12. using
following commands:
pip install --upgrade --user pyqtwebengine==5.12
pip install --upgrade --user pyqt5==5.12
By this, I have successfully installed pyqt5
I have been unable to find a single pip command to install from a repository (svn, git) or tarball/zip as a wheel. I'm using Python 2.7. For example, Genshi is only available from PyPI as tarball or zip. The package is installed as an egg:
~$virtualenv pve
New python executable in /Users/rjollos/pve/bin/python2.7
Also creating executable in /Users/rjollos/pve/bin/python
Installing setuptools, pip, wheel...done.
~$. pve/bin/activate
(pve) ~$pip install -U pip wheel setuptools
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting wheel
Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting setuptools
Downloading setuptools-34.2.0-py2.py3-none-any.whl (389kB)
100% |████████████████████████████████| 393kB 810kB/s
Collecting packaging>=16.8 (from setuptools)
Using cached packaging-16.8-py2.py3-none-any.whl
Collecting six>=1.6.0 (from setuptools)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools)
Using cached appdirs-1.4.0-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools)
Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Installing collected packages: pip, wheel, six, pyparsing, packaging, appdirs, setuptools
Found existing installation: pip 8.0.2
Uninstalling pip-8.0.2:
Successfully uninstalled pip-8.0.2
Found existing installation: wheel 0.26.0
Uninstalling wheel-0.26.0:
Successfully uninstalled wheel-0.26.0
Found existing installation: setuptools 19.6.2
Uninstalling setuptools-19.6.2:
Successfully uninstalled setuptools-19.6.2
Successfully installed appdirs-1.4.0 packaging-16.8 pip-9.0.1 pyparsing-2.1.10 setuptools-34.2.0 six-1.10.0 wheel-0.29.0
$pip install --no-cache-dir genshi
Collecting genshi
Downloading Genshi-0.7.tar.gz (491kB)
100% |████████████████████████████████| 501kB 1.8MB/s
Installing collected packages: genshi
Running setup.py install for gens
$ls -ld pve/lib/python2.7/site-packages/Genshi*
drwxr-xr-x 9 rjollos staff 306 Feb 16 00:36 pve/lib/python2.7/site-packages/Genshi-0.7-py2.7.egg-info
As a workaround, I can create a wheel and then install the wheel:
(pve) ~$pip wheel --no-cache-dir --wheel-dir wheels genshi
Collecting genshi
Downloading Genshi-0.7.tar.gz (491kB)
100% |████████████████████████████████| 501kB 1.7MB/s
Building wheels for collected packages: genshi
Running setup.py bdist_wheel for genshi ... done
Stored in directory: /Users/rjollos/wheels
Successfully built genshi
(pve) ~$pip install wheels/Genshi-0.7-cp27-cp27m-macosx_10_12_x86_64.whl
Processing ./wheels/Genshi-0.7-cp27-cp27m-macosx_10_12_x86_64.whl
Installing collected packages: Genshi
Successfully installed Genshi-0.7
(pve) ~$ls -ld pve/lib/python2.7/site-packages/Genshi*
drwxr-xr-x 10 rjollos staff 340 Feb 16 00:43 pve/lib/python2.7/site-packages/Genshi-0.7.dist-info
Is there a way to build and install a wheel from a tarball/zip archive in a single pip command? There doesn't appear to be a --wheel option for pip install. There's an --only-binary option, but it will fail if a prebuilt wheel can't be found.