I'm trying to run
from urllib.request import urlretrieve
url = "https://www.cs.cmu.edu/~./enron/enron_mail_20150507.tgz"
urlretrieve(url, filename="../enron_mail_20150507.tgz")
to download the dataset. I get an SSL certificate verify fail error, which is solved in this question: ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) by running
/Applications/Python\ 3.6/Install\ Certificates.command
This gives me an error:
-- pip install --upgrade certifi
Collecting certifi
Using cached https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl
Installing collected packages: certifi
Found existing installation: certifi 2018.4.16
Uninstalling certifi-2018.4.16:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/certifi-2018.4.16.dist-info/DESCRIPTION.rst'
Consider using the `--user` option or check the permissions.
I tried changing the command code but its write-protected so I figured I shouldn't mess with it. So I ran
pip install --upgrade certifi
and it updated, but when I try to download the Enron data again I still get the same message. It seems as if the command gets caught up on the older version of certifi. I have Python 2.7 and 3.6 on this computer for some reason so I ran pip3 because that works sometimes but still am getting the same error.
Related
I’m trying to install some third party packages on my command prompt using pip so I can import them in my own code but the thing is bringing out this error below
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\program files\python38\Lib\site-packages\asgiref'
Consider using the --user option or check the permissions.
WARNING: You are using pip version 19.2.3, however version 22.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I updated my Python3 to Python 3.10. It still is showing Python 3.8 as my current version. but that's not the issue. My issue is that when I went to install the matplotlib package using pip install matplotlib, I got some errors. I also tried running pip3 install matplotlib. I got the following errors:
WARNING: Retrying (Retry(total=4, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
object at 0x1057db7c0>: Failed to establish a new connection: [Errno
8] nodename nor servname provided, or not known')':
/simple/matplotlib/
ERROR: Could not find a version that satisfies the requirement
matplotlib (from versions: none) ERROR: No matching distribution found
for matplotlib
The I tried running /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip and got the following error:
Defaulting to user installation because normal site-packages is not
writeable.
Requirement already up-to-date: pip in
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
(20.2.3)
I don't get it. It wanted me to upgrade pip and then says it's already up to date?
I just need the matplotlib module installed for my Python scripts.
If you are trying to install matplotlib in your organisation laptop then your organsiation could be blocking the network to connect and download the package. This is one reason its showing retrying error message. You can try disconnecting vpn if you are connecting with any and retry installing it. This error is due to network issue only.
When I install pycurl
>$ /opt/python/run/venv/bin/pip install pycurl --global-option="--with-openssl" --upgrade
/opt/python/run/venv/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py:230: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Collecting pycurl
Using cached pycurl-7.43.0.6.tar.gz (222 kB)
Skipping wheel build for pycurl, due to binaries being disabled for it.
Installing collected packages: pycurl
Running setup.py install for pycurl ... done
Successfully installed pycurl-7.43.0.6
Then checks installation, it does not appear
>$ /opt/python/run/venv/bin/pip show pycurl
WARNING: Package(s) not found: pycurl
And of course any code wanting to use the lib does not find it (celery, for instance)
What I am doing wrong?
I found the answer to another question (sorry, I can't find the link).
This worked for me:
export CPPFLAGS=-I/usr/local/opt/openssl/include
export LDFLAGS=-L/usr/local/opt/openssl/lib
pip install pycurl==7.43.0.5 --global-option="--with-openssl" --upgrade
I tried to install MechanicalSoup package via pip but i got these errors :
Download error on https://pypi.org/simple/pytest-runner/: [SSL:
TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version
(_ssl.c:645) --
Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
No local packages or working download links found for pytest-runner
I tried several ways , but they could not help me .
First install pytest-runner as follows and try again:
pip3 install pytest-runner
or,
python3 -m pip install pytest-runner
You may want to add the --user tag if permission is denied.
under root I ran pip3 install service_identity and easy_install service_identity
both installed successfully yet the warning still shows and clients can't connect.
They close before handshake.
Full Warning
:0: UserWarning: You do not have a working installation of the service_identity >module: 'No module named 'cryptography.x509''. Please install it from https://pypi.python.org/pypi/service_identity and make sure all of its >dependencies are satisfied. Without the service_identity module, Twisted can >perform only rudimentary TLS client hostname verification. Many valid >certificate/hostname mappings may be rejected.
Fixed with the following,
pip3 install cryptography
pip3 install cffi --upgrade
pip3 install service_identity --upgrade
pip3 install pyopenssl --upgrade