I'm using django in a virtual environment. I'm using powershell and trying to install pyopenssl.
Inside Virtual environment:
pip version = 19.2.3
python version = 3.8.3
Outside Virtual environment:
pip version = 21.2.4
python version = 3.8.3
I tried to upgrade pip inside virtual environment using python -m pip install -U pip and pip install --upgrade pip but it is hanged without producing any output here is the screenshot.
I try pip install pyopenssl:
(bookmarks) bookmarks> pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting six>=1.5.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ...
it hangs on Installing build dependencies .... I've waited 30mins but nothing happened.
I've also tried python -m pip install pyopenssl
(bookmarks) bookmarks> python -m pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ... \
And when I try pip -v install pyopenssl:
(Since the ouput is large, i'm only showing the last part.)
Added semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) to build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
Removed semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) from build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
Installing collected packages: setuptools, wheel, pycparser, cffi, toml, semantic-version, setuptools-rust
Creating C:\Users\Suhail\AppData\Local\Temp\pip-build-env-fwbrqqmx\overlay\Scripts
Successfully installed cffi-1.14.6 pycparser-2.20 semantic-version-2.8.5 setuptools-58.1.0 setuptools-rust-0.12.1 toml-0.10.2 wheel-0.37.0
Cleaning up...
Cleaned build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
Here again i'm stuck at this output, and pyOpenSSL is not installed.
However, pip install pyopenssl worked outside of the virtual environment screenshot
I'm stuck at this freeze for 2 days.
If you know the solution then please answer it. Thankyou
Here's what worked for me
Step 1: First I uninstalled pip:
pip uninstall pip
To make sure pip is uninstalled type pip and make sure you get ModuleNotFoundError: No module named 'pip'
Step 2: Download PIP get-pip.py:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Step 3: Install PIP:
python get-pip.py
To make sure pip is installed run pip --version make sure it is latest, (21.2.4) as of now.
Finally I was able to install pyopenssl :))
pip install pyopenssl
Related
I'm building a azure devops pipeline, to deploy an databricks notebook, however, before I get to that step I need to install a few things.
In a bash step I have the following
echo "Updating pip"
python3 -m pip install --upgrade pip
I've also tried the following
pip install --upgrade pip
Both yield the same error log that:
2020-07-07T09:19:21.9087970Z Updating pip
2020-07-07T09:19:22.8470016Z Collecting pip
2020-07-07T09:19:23.1307705Z Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
2020-07-07T09:19:23.4814923Z Installing collected packages: pip
2020-07-07T09:19:24.3589221Z Successfully installed pip-8.1.1
2020-07-07T09:19:24.5176900Z You are using pip version 8.1.1, however version 20.1.1 is available.
2020-07-07T09:19:24.5178120Z You should consider upgrading via the 'pip install --upgrade pip' command.
I'm a puzzled by the fact that the output showes that it is installing pip-8.1.1, when it is clearly downloading the newest version (20.1.1) of pip.
I'm clearly missing something.
Thanks for your time and help in advance!
I solved the issue by adding a step before the bash script to select Python
- task: UsePythonVersion#0
displayName: 'Use Python 3.8'
inputs:
versionSpec: 3.8
According to the log it is merely adding a path env variable to PATH
2020-07-07T13:02:27.1599357Z Prepending PATH environment variable with directory: /opt/hostedtoolcache/Python/3.8.3/x64
2020-07-07T13:02:27.1607326Z Prepending PATH environment variable with directory: /opt/hostedtoolcache/Python/3.8.3/x64/bin
After adding the above step I get the following log
2020-07-07T13:02:31.6513097Z Collecting pip
2020-07-07T13:02:31.7236234Z Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
2020-07-07T13:02:32.0470915Z Installing collected packages: pip
2020-07-07T13:02:32.0471385Z Attempting uninstall: pip
2020-07-07T13:02:32.0484694Z Found existing installation: pip 20.1.1
2020-07-07T13:02:32.2325914Z Uninstalling pip-20.1.1:
2020-07-07T13:02:32.2701613Z Successfully uninstalled pip-20.1.1
2020-07-07T13:02:33.4108823Z Successfully installed pip-20.1.1
This solved my problem of updating pip (though Python 3 already had the latest version), and made me able to run the next steps too.
I installed ActiveState Python 3.4 on a lot of servers.
To bring pip up to date, I'm running this command on each server:
"C:\Python34\python.exe" -m pip install --upgrade pip
Some of the time, it upgrades to pip version 10.0.1:
Downloading/unpacking pip from https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl#sha256=717cdffb2833be8409433a93746744b59505f42146e8d37de6c62b430e25d6d7
Installing collected packages: pip
Found existing installation: pip 1.5.6
Uninstalling pip:
Successfully uninstalled pip
Successfully installed pip
Cleaning up...
But, some of the time it doesn't upgrade at all and it keeps pip at version 1.5.6:
Requirement already up-to-date: pip in c:\python34\lib\site-packages
Cleaning up...
Why is it behaving differently on different servers? Is there a way to force the upgrade to happen?
I see what happened. On some of the servers, when I tried to update pip the first time, there was an error in the middle of the process. And the folder C:\Python34\Lib\site-packages\pip-10.0.1.dist-info was created, even though the install hadn't finished. If I remove that folder and then run the upgrade, it works fine.
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.
I uninstalled pip and reinstalled it from get-pip.py, yet it reports the wrong version.
C:\>python get-pip.py
Collecting pip
Cache entry deserialization failed, entry ignored
Using cached pip-8.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.1.1
C:\>pause
Press any key to continue . . .
PS C:\> pip --version
pip 6.0.3 from c:\python33\lib (python 3.3)
Has the correct version been installed? Every time I use pip it still tells me to upgrade.
Deleting c:\python33\lib\pip solved the issue.
"Python Xlib" ( http://pypi.python.org/pypi/Python%20Xlib ) is a low level python library for working with xlib. I have installed it on my Ubuntu Linux machine via apt, i.e. sudo aptitude install python-xlib. However is it possible to install it with pip in a virtualenv? I am writing a software package that uses xlib, and would like to be able to include an install_requires line in my setup.py.
Since the package is on PyPI (and appears in results of pip search xlib), I tried to pip install … the following package names but nothing worked: python\ xlib, python-xlib, Python Xlib, Python-Xlib, Python%20Xlib, but none worked.
`
Is it possible to install python xlib with pip?
sudo pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/
Worked for me.
pip3 install python3-xlib
and
pip3 install python-xlib
When we run this command from the terminal, we can easily install it:
Collecting python3-xlib
Downloading https://files.pythonhosted.org/packages/ef/c6/2c5999de3bb1533521f1101e8fe56fd9c266732f4d48011c7c69b29d12ae/python3-xlib-0.15.tar.gz (132kB)
|████████████████████████████████| 133kB 1.3MB/s
Installing collected packages: python3-xlib
Running setup.py install for python3-xlib ... done
Successfully installed python3-xlib-0.15
GeorgeGentlys-Mac-mini:~ georgegently$ pip3 install python-xlib
Collecting python-xlib
Downloading https://files.pythonhosted.org/packages/f7/91/9f794491d1a8b810a9d4bb8fc9766a98354cb62bd6990685032b00f87001/python_xlib-0.25-py2.py3-none-any.whl (165kB)
|████████████████████████████████| 174kB 1.3MB/s
Collecting six>=1.10.0 (from python-xlib)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-xlib
Successfully installed python-xlib-0.25 six-1.12.0```