Can't get pyperclip on Anaconda (Python 3.7) - anaconda

I've tried
conda install -c conda-forge pyperclip
and get the following error:
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I've also try to download pyperclip-1.7.0.tar.gz, unzip it (the folder is pyperclip-1.7.0) and copy it to multiple folders (e.g. ...\Continuum\anaconda3\Scripts and ...\Continuum\anaconda3\Lib)
but when I try to import it, I get a "ModuleNotFoundError: No module named 'pyperclip'" message

pip install pyperclip
worked from the Anaconda prompt (I was using CMD)

Related

How to totally fix the SSLcertverificationError when using pip?

What happens when I try to install something (pytorch for example) with pip:
'''Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pytorch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pytorch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping'''
One way to temporarily avoid this is seting the Use a Proxy Server switch to Off in the Windows Manual Proxy Setup section, but later it will be set back to On automatically.
So what's wrong with the pip or windows? or this Error is related to my vpn?
I think I found the reason!
The reason why the Use a Proxy Server switch automatically changes is my V2rayN had been closed abnormally, so its process continuously changes my settings. To fix this, I just restart V2rayN in administrator mode and quit so that it will manage proxy settings properly.
As to the SSLError, it is because the Proxy switch is on. So after I fix the switch I can use pip to install things again.

How do I install **Pytorch** with conda? Is anaconda.org down temporarily?

I just installed Anaconda and now I'm trying to install pytorch via conda install pytorch torchvision cudatoolkit=10.2 -c pytorch. But I'm getting the error message
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 503 SERVICE UNAVAILABLE: BACK-END SERVER IS AT CAPACITY for url <https://conda.anaconda.org/pytorch/win-64/current_repodata.json>
Elapsed: 00:00.635763
CF-RAY: 5c7c36945d34c4a4-DUS
A remote server error occurred when trying to retrieve this URL.
A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request. The problem may be spurious, and will resolve itself if you
try your request again. If the problem persists, consider notifying the maintainer
of the remote server.
How can I resolve this and install pytorch? Is anaconda.org just down temporarily?
The answer to your problem is in your question itself . The last paragraph says that :
A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request. The problem may be spurious, and will resolve itself if you
try your request again. If the problem persists, consider notifying the maintainer
of the remote server.
This would mean that you would have to try again later . This generally happens when the official websites are down and this has happened earlier as well . So you just have to wait it out.

How to configure azure-cli behind a corporate proxy on Windows

I'm using Windows 10 behind a corporate proxy and az --version outputs the following:
azure-cli 2.5.1
command-modules-nspkg 2.0.3
core 2.5.1
nspkg 3.0.4
telemetry 1.0.4
...
Unable to check if your CLI is up-to-date. Check your internet connection.
Furthermore, az extension list-available throws:
Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))
How to configure azure-cli for the corporate proxy?
Download local proxy configuration from http://wpad/wpad.dat
At the beginning of the wpad.dat file there is a line similar to CWSProxy="PROXY proxy.corporation.com:8082";
Enter the proxy server to environment variable HTTPS_PROXY, e.g. in bash: export HTTPS_PROXY="proxy.corporation.com:8082"
Now az extension list-available connects. However, for some reason, az --version is still giving Unable to check if your CLI is up-to-date. Check your internet connection. You can now anyway install extensions such as az extension add --name azure-devops.
From https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest&tabs=azure-cli#proxy-blocks-connection
For Windows 10, you could check the proxy settings in the Settings > Network & Internet > Proxy pane. Contact your system administrator for the required settings, or for situations where your machine may be configuration-managed or require advanced setup.

pip ConnectTimeoutError

When trying to install something using pip I am getting a ConnectTimeoutError error !
For example, when I try:
pip install 'something'
The following error occurs:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to 'some dev server' timed out. (connect timeout=15)')': /.../.../
Is my pip behind some proxy?
To clarify, by default pip installs software from https://pypi.python.org/pypi. However, pip can be configured to use a different server.
It seems like you are not able to reach the PyPI server that your pip is trying to use. In your error message you have the string 'Connection to 'some dev server' timed out.. If I see that correctly, your pip is trying to connect to a local PyPI server instead of the public one.
This post and this one describe how to set up a custom PyPI server. Both describe different ways to tell pip which server to use.
.pip/pip.conf
In this config file you can specify an index-url which points to a custom server. Check if this file exists and has a value for index-url that does not point to https://pypi.python.org/pypi. The example given in the first post looks like this:
[global]
index-url = https://pip.curle.io/simple/
This tells pip to not use the public PyPI server, but the one at https://pip.curle.io/simple/.
.pypirc
This file that should sit in your home folder can also contain alternative paths to PyPI servers. They can look like this (taken from second link):
[distutils]
index-servers =
internal
[internal]
repository: https://pypi.myserver.com/
username: username
password: password
This one points to the local server https://pypi.myserver.com/ under the name internal. Check if this file is present and its content.
What to do?
If you find the local PyPI server, find out who runs it and if it is currently running. This error can arise if the server process stopped or the machine it usually runs on is down. Any advice more specific than that would require more information from your side on your work environment.

EC2 yum 404 error

I'm using an instance of Amazon EC2, Redhat.
Since I updated yum last time, it doesn't work any more, always get error messages of 404 not found, for example:
failure: repodata/repomd.xml from rhui-REGION-rhel-server-releases: [Errno 256] No more mirrors to try.
https://rhui2-cds01.us-east-2.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/%24releasever/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
https://rhui2-cds02.us-east-2.aws.ce.redhat.com/pulp/repos//content/dist/rhel/rhui/server/7/%24releasever/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Anyone knows the solution?
According to redhat https://access.redhat.com/articles/1320623
Typical Cause This issue generally occurs if client system is able to
communicate with given server but could not find or access the
requested package on the server.
Resolution This issue can occur due to corruption of local client
cache, try to clear cache on client system:
Try
rm -fr /var/cache/yum/*
yum clean all
then
yum update

Resources