Install anaconda library from a local source - python

I have been trying to install pymc for some time on a Windows PC behind a very complicated proxy; effectively making this an installation on a computer not connected to the internet. I have tried - unsuccessfully - to set a proxy in the condarc file but I still get error messages
conda install -c https://conda.binstar.org/pymc pymc
Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

To solve this, you need to download the tar file (even if using Windows) that the installer is trying to fetch and then use offline mode:
Use this command (which will throw an error), to determine the file to be downloaded:
>conda install -c https://conda.binstar.org/pymc pymc
Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
....
Solving package specifications: ......................
The following packages will be downloaded:
package | build
---------------------------|-----------------
pymc-2.3.5 | np110py35_0 402 KB defaults
The following NEW packages will be INSTALLED:
pymc: 2.3.5-np110py35_0 defaults
Proceed ([y]/n)? y
Fetching packages ...
Could not connect to https://repo.continuum.io/pkgs/free/win-64/pymc-2.3.5-np110py35_0.tar.bz2
... [error message continues]...
Now download the tar file mentioned in the error message:
https://repo.continuum.io/pkgs/free/win-64/pymc-2.3.5-np110py35_0.tar.bz2
And then run this command with the path to the tar file:
>conda install --offline C:\pymc-2.3.5-np110py35_0.tar.bz2

Just of notes: "-c conda-forge" might be handy for some other packages. For example:
conda install -c conda-forge python-levenshtein

Adding to the solution above. Anyone met "SSL verification error" can just turn the verification step off temporarily in ~/.condarc
channels:
- defaults
ssl_verify: true
In this way, you could install from your local hub.

I was not able to run offline installation in Anaconda (on Win10) because Anaconda always tried to connect to remote channels or collecting metadata process failed.
To solve this I had to:
Download requested module as bz2 file (or convert tar.gz into tar.bz2)
Run Anaconda prompt (ev. navigate to folder with bz2 file)
Run offline installation with conda install path-to-bz2, i.e conda install zeep-4.0.0.tar.bz2

Related

SSL error on macOS Monterey when using python urllib via RDFLib

So I have been getting the following error when trying to request an HTTPS resource using the python RDFLib module:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
What I have tried thus far:
Installed Python 3.10.4 from python.org
Executed the Install Certificates.command successfully tried the request again and I get the same error
Created a virtual environment using python3 -m venv venv which is based on Python 3.10.4, activated it, updated certifi just in case using pip3 install certifi --upgrade as it was suggested in other posts, and tried the request again and I still got the error.
Out of desperation, I did a clean install of Monterey and still get the same error
So it appears that the issue is that the certificates are not actually getting installed even though the command executes successfully:
/Applications/Python\ 3.10/Install\ Certificates.command ; exit;
meh#iMac ~ % /Applications/Python\ 3.10/Install\ Certificates.command ; exit;
-- pip install --upgrade certifi
Requirement already satisfied: certifi in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (2021.10.8)
-- removing any existing file or link
-- creating symlink to certifi certificate bundle
-- setting permissions
-- update complete
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
I have actually been trying to solve this for many months, coming back and trying again and again but I can't seem to find a solution.
This seems to be a common issue that is usually resolved by executing the Install Certificates.command but that simply doesn't work for me. It's worth noting that I have the same issue on a brand new MacBook Pro with Monterey.
I would appreciate any suggestions on what I can try next.
It turns out that the target resource has a misconfigured certificate. Since there is no way to disable certificate verification in RDFLib - as far as I can tell - I have worked around the solution by requesting the resource via the python requests module with verify=False instead. Then I load the resource into RDFLib as text.

MacOS 10.13 High Sierra "pip3 install" command doesn't work (SSLError)

for my job purposes, I need a MacOS, but there is no possibility to use a real mac. So I decided to set up virtual machine, using Virtualbox. After the machine was successfully setup, I've opened the Terminal app and run the following commands:
1)/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" (Homebrew install)
2)brew install python (Python 3 install)
3)pip3 install numpy
As an output of the last command, I got the next error message:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Of course, I've tried to find a solution online. Reinstalling python or openssl via Homebrew didn't help. Linking openssl or installing other CA also didn't solve the problem. How can I actually fix this?
P.C. I also know that Apple is a sh*t company and tries to have minimum hardware and software of other companies. That's why they use LibreSSL instead of OpenSSL. But the last one is one that Python requests in order to have the ability to install packages via pip. After python was installed, the following message was in terminal:
This formula is keg-only, which means it was not symlinked into /usr/local.
If you need to have openssl#1.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.bash_profile
Running proposed command also doesn't solve the problem. Any thoughts?

How to fix SSL error while downloading a python package [duplicate]

I have a problem with conda update. Specifically, I tried doing
conda update <package>
, and I got the following error:
Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.
bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2
The full output of the command was the following:
conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) . Solving package specifications: . Package plan for installation in environment //anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
decorator-4.0.2 | py27_0 11 KB
ipython_genutils-0.1.0 | py27_0 32 KB
path.py-8.1.1 | py27_0 45 KB
pexpect-3.3 | py27_0 60 KB
pickleshare-0.5 | py27_0 8 KB
simplegeneric-0.8.1 | py27_0 6 KB
traitlets-4.0.0 | py27_0 88 KB
ipython-4.0.0 | py27_0 916 KB
jinja2-2.8 | py27_0 263 KB
tornado-4.2.1 | py27_0 515 KB
bokeh-0.9.3 | np19py27_0 14.3 MB
------------------------------------------------------------
Total: 16.2 MB
The following NEW packages will be INSTALLED:
ipython_genutils: 0.1.0-py27_0
path.py: 8.1.1-py27_0
pexpect: 3.3-py27_0
pickleshare: 0.5-py27_0
simplegeneric: 0.8.1-py27_0
traitlets: 4.0.0-py27_0
The following packages will be UPDATED:
bokeh: 0.9.0-np19py27_0 --> 0.9.3-np19py27_0
decorator: 3.4.2-py27_0 --> 4.0.2-py27_0
ipython: 3.2.0-py27_0 --> 4.0.0-py27_0
jinja2: 2.7.3-py27_1 --> 2.8-py27_0
tornado: 4.2-py27_0 --> 4.2.1-py27_0
Proceed ([y]/n)? y
Fetching packages ... Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2
dendisuhubdy:finalproject dendisuhubdy$ brew link --force openssl Linking /usr/local/Cellar/openssl/1.0.2d_1... 1548 symlinks created dendisuhubdy:finalproject dendisuhubdy$ conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) .SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) . Solving package specifications: . Package plan for installation in environment //anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
decorator-4.0.2 | py27_0 11 KB
ipython_genutils-0.1.0 | py27_0 32 KB
path.py-8.1.1 | py27_0 45 KB
pexpect-3.3 | py27_0 60 KB
pickleshare-0.5 | py27_0 8 KB
simplegeneric-0.8.1 | py27_0 6 KB
traitlets-4.0.0 | py27_0 88 KB
ipython-4.0.0 | py27_0 916 KB
jinja2-2.8 | py27_0 263 KB
tornado-4.2.1 | py27_0 515 KB
bokeh-0.9.3 | np19py27_0 14.3 MB
------------------------------------------------------------
Total: 16.2 MB
The following NEW packages will be INSTALLED:
ipython_genutils: 0.1.0-py27_0
path.py: 8.1.1-py27_0
pexpect: 3.3-py27_0
pickleshare: 0.5-py27_0
simplegeneric: 0.8.1-py27_0
traitlets: 4.0.0-py27_0
The following packages will be UPDATED:
bokeh: 0.9.0-np19py27_0 --> 0.9.3-np19py27_0
decorator: 3.4.2-py27_0 --> 4.0.2-py27_0
ipython: 3.2.0-py27_0 --> 4.0.0-py27_0
jinja2: 2.7.3-py27_1 --> 2.8-py27_0
tornado: 4.2-py27_0 --> 4.2.1-py27_0
Proceed ([y]/n)? y
Fetching packages ... Could not connect to https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2 Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/free/osx-64/decorator-4.0.2-py27_0.tar.bz2
Please advise: what should I do to overcome this error?
Please note that the following solution is not secure. See: https://conda.io/projects/conda/en/latest/user-guide/configuration/disable-ssl-verification.html
according to #jreback here https://github.com/conda/conda/issues/1166
conda config --set ssl_verify false
will turn off this feature, e.g. here
Conda needs to know where to find you SSL certificate store.
conda config --set ssl_verify <pathToYourFile>.crt
No need to disable SSL verification.
This command add a line to your $HOME/.condarc file or %USERPROFILE%\.condarc file on Windows that looks like:
ssl_verify: <pathToYourFile>.crt
If you leave your organization's network, you can just comment out that line in .condarc with a # and uncomment when you return.
If it still doesn't work, make sure that you are using the latest version of curl, checking both the conda-forge and anaconda channels.
This seemed to do the trick for me:
conda remove certifi
conda install certifi
Then you can do whatever you were trying to do before, e.g.
conda update --all
I faced the same problem on Mac OS X and with Miniconda. After trying many of the proposed solutions for hours I found that I needed to correctly set Conda's environment – specifically requests' environment variable – to use the Root certificate that my company provided rather than the generic ones that Conda provides.
Here is how I solved it:
Open Chrome, go to any website, click on the lock icon on the left of the URL. Click on «Certificate» on the dropdown. In the next window you see a stack of certificates. The uppermost (aka top line in window) is the root certificate (e.g. Zscaler Root CA in my case, yours will very likely be a different one).
Open Mac OS keychain, click on «Certificates» and choose among the many certificates the root certificate that you just identified. Export this to any folder of your choosing.
Convert this certificate with openssl: openssl x509 -inform der -in /path/to/your/certificate.cer -out /path/to/converted/certificate.pem
For a quick check set your shell to acknowledge the certificate: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem
To set this permanently open your shell profile (.bshrs or e.g. .zshrc) and add this line: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem. Now exit your terminal/shell and reopen. Check again.
You should be set and Conda should work fine.
For those of us on corporate networks using web filters that implement trusted man in the middle SSL solutions, it is necessary to add the web-filter certificate to the certifi cacert.pem.
A guide to doing this is here.
Main steps are:
connect to https site with browser
view and save root certificate
convert cert to .pem
copy and paste onto end of existing cacert.pem
save
SSL happiness
For everyone struggling with this issue, you simply need to upgrade your openssl installation. I'm running windows 10, installed the latest anaconda 64-bit and am getting this error when I try to install/upgrade anything with 'conda' or 'pip'. If I uninstall the 64-bit anaconda and install the 32-bit, it works fine.
I had a 64-bit version of openssl for windows installed, version 1.1.0 something. I uninstalled that and installed the latest I could find from here: https://slproweb.com/products/Win32OpenSSL.html -- there is a 64-bit version of 1.1.1 on there that worked. Now I can install packages via pip and conda successfully.
Hope this helps.
That SSL error is misleading. I am using Anaconda 3, conda version 4.6.11, have the most current version of openssl on a Windows 10 instance. I got the issue resolved by changing the security settings on the Anaconda3 folder to Full Control.
Don't think this helped, but I also have modified the ..\Anaconda3\Lib\site-packages\certifi\cacert.pem file to include the company's SSL cert.
Hope this info helps you.
The following worked for me: (MAC)
Use homebrew to install openssl1.1 certs
brew install openssl#1.1
Add the installed certs to an env variable with:
export REQUESTS_CA_BUNDLE='/usr/local/etc/openssl#1.1/cert.pem'
To persist your env variable to anaconda, first activate the relevant environment, then execute:
conda env config vars set export REQUESTS_CA_BUNDLE='/usr/local/etc/openssl#1.1/cert.pem'
New poster unable to comment yet - but here's an additional option and clarification if you have a non-default trusted SSL certificate, such as when using corporate internet monitoring software like ZScaler.
Assuming you have a new trusted.pem file, you may need to append this trusted.pem to the certificate at the path python -m certifi, AND, set this concatenated .pem file to the REQUESTS_CA_BUNDLE variable.
It may not work if you only set REQUESTS_CA_BUNDLE to trusted.pem.
Tested on Windows 10. Related variables are AWS_CA_BUNDLE, SSL_CERT_FILE, and CURL_CA_BUNDLE, though these need to be set to trusted.pem only on your local, not to the concatenated version.
For whatever reason, inside a Dockerfile, these ENV variables need to be the concatenated .pem file (after relevant COPY commands of course)
This is due to .dll error
go to location where you've install anaconda anaconda3>Library>bin. search and copy these two .dll files
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
paste to this folder: anaconda3>DLLs.
then restart your pc.
issue will get resolved. This works for me.
Credit to: https://github.com/conda/conda/issues/11982
For me the problem was the proxy configuration. I had in my .condarc:
proxy_servers:
http: http://our.proxy.org:80/
https: https://our.proxy.org:80/
that did not work. Instead, the HTTPS proxy had to be specified with the http protocol (i.e. without the s). So,
proxy_servers:
http: http://our.proxy.org:80/
https: http://our.proxy.org:80/
After 2 hrs of net surfing Finally For me the problem was fixed by creating a folder pip, with a file: pip.ini in C:\Users<username>\AppData\Roaming\ e.g:
C:\Users\<username>\AppData\Roaming\pip\pip.ini
Inside it I wrote:
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
I restarted python, and then pip permanently trusted these sites, and used them to download packages from.
If you can't find the AppData Folder on windows, write %appdata% in file explorer and it should appear.
Source : pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"
on windows, set the SSL_NO_VERIF environment variable to 1.
set SSL_NO_VERIFY=1
refer to https://conda.io/projects/conda/en/latest/user-guide/configuration/disable-ssl-verification.html
In order that anaconda3 will work with RHEL\Centos based:
Add your certificates to: /etc/pki/ca-trust/source/anchors/
Run:
update-ca-trust
Export:
export CURL_CA_BUNDLE=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
export REQUEST_CA_BUNDLE=/etc/pki/ca-trust/extracted/openssl/cabundle.trust.crt
export SSL_CERT_FILE=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt`
Run:
conda info -s
You should see those envs configured in conda.
For me, it's actually because I am using VPN. So I'm just turning VPN off, this problem solved. (confusing me quiet a while)
Hope this answer helpful.
I seem to have discovered another scenario which is not covered by all the possible causes listed here. Inexplicably, even turning of ssl_verify had no effect and kept producing the same SSLError. set SSL_NO_VERIFY=1 also had no effect.
It turns out that this is due the REQUESTS_CA_BUNDLE variable that we have set to the standard corporate certificate bundle. It includes zscaler proxy certificates etc. and other internal CAs needed for everyday development. But apparently our internal Anaconda repository uses its own certificate that is not covered by this bundle.
I guess the only surprising part here was the precedence. I was incorrectly expecting at least the conda specific environment variable (if not the .condarc setting) to override any other implicit ones like the requests library variable.
So, a quick way to debug this in my case was to temporarily remove the requests variable while I request for the anaconda certificate to be added to the corporate bundle:
set REQUESTS_CA_BUNDLE=
Of course, a better fix is to configure the individual certificate explicitly as shown in other answers:
conda config --set ssl_verify "C:\ProgramData\condaRepoCert.pem"

Certificate Verification Failure for youtube-dl

I am trying to get the audio from a YouTube video, using the command:
youtube-dl --extract-audio --audio-format mp3 [video link]
Each time I try to run this command in Terminal on macOS (High Sierra v10.13.2), it gives me this error:
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)> (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)'),))
Note: I have youtube-dl installed, and also have Python 2.7 and Python 3.6 (if that helps)
If anyone can help me resolve that issue, that would be great.
I've had this issue for a while now and was never able to solve it. So I did the temporary fix of
[ Terminal ]
--no-check-certificate
Sadly, that just turns your HTTPS youtube-dl request into a plain text HTTP request.
After some digging I found that it was a Python v3.6 issue.
https://bugs.python.org/issue29065#msg283984
If you use VIM or any edit to check
vim '/Applications/Python 3.6/ReadMe.rtf'
If you look for ( Certificate verification and OpenSSL\ )
You'll see that ...
During installation of Python v3.6 They decide to use their own private version of OpenSSL, unfortunately that doesn't natively work with the default root certificates. It does however, come with a command script to install a curated bundle of default root certificates.
The bug recommended me to the python certifi module. The modules just seems to be good for finding where your certificate is.
[ Python v3.6 ]
import certifi
certifi.where()
'/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/certifi/cacert.pem'
That really just told where it was, but I did it using the python terminal interpreter just in case.
[ Terminal ]
open '/Applications/Python 3.6/Install Certificates.command'
Me personally this was my terminal response...
[ Terminal ]
-- pip install --upgrade certifi
Requirement already up-to-date: certifi in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
-- removing any existing file or link
-- creating symlink to certifi certificate bundle
-- setting permissions
Traceback (most recent call last):
File "", line 44, in
File "", line 40, in main
PermissionError: [Errno 1] Operation not permitted: 'cert.pem'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
BUT IT WORKED AND I DON'T HAVE TO DEAL WITH THAT SSL VERIFICATION FAILED ANYMORE! (-.-)\ /(-.-)/
I will try to make a proper approach to the problem rather than just listing what works for me. The following does not require the Install Certificates.command script, which may or may not have been installed along with Python.
Source of the problem
It needs to be pointed out that the source of the error is not Python itself. Looking closely to the error message, you can see that Python just communicates the error produced by the OpenSSL library (called by _ssl.c). If the Python you are using has been installed using homebrew, chances are that more network utilities (e.g. wget) installed using homebrew have similar issues.
This means that in order to fix the problem, we need to make sure that the OpenSSL library used by Python has access to a valid, up-to-date certificates bundle.
Locating the right OpenSSL library
As many OpenSSL libraries may be installed on your system, you need to find the one used by your Python interpreter. The OpenSSL library is loaded by the ssl Python module, so we need to locate that first:
pyssld=$(python3 -c 'import ssl, pathlib; print(pathlib.Path(ssl.__file__).parent)')
echo "$pyssld"
This will print out the directory where we should look for the C library used by the ssl to load OpenSSL. This is done with the following command:
pyssl=$(find "$pyssld" -iname '*ssl*.so')
echo "$pyssl"
Finally, we can check where the OpenSSL library loaded by the Python ssl module is located:
pyopenssl=$(otool -L "$pyssl" | grep libssl | awk '{print $1}')
echo "$pyopenssl"
This shall print something like:
/opt/homebrew/opt/openssl#1.1/lib/libssl.1.1.dylib
This points where the OpenSSL library used by Python is located.
Fixing the problem
Acquiring a certificate bundle
To acquire an up to date certificate bundle to use with OpenSSL library, you can install the Python certifi package.
pip3 install --upgrade certifi
cabundle=$(python3 -c 'import certifi; print(certifi.where())')
echo $cabundle
Adding the new certificate bundle to OpenSSL
Finally, we need to place the certificate bundle where OpenSSL can find it. We know the location of the library. But the bundles are stored in a different directory. To jump to the right directory and link the bundle, use:
cd $(echo "$pyopenssl" | sed -E 's%/opt/(openssl[^/]*).*%/etc/\1%')
ln -sf "$cabundle" cert.pem
Cleanup
After checking that everything works, you can now clean up the environment variables we have used.
unset cabundle pyopenssl pyssl pyssld

How to install ipywidgets offline (from file)

So I am trying to install ipywidgets-0.0.1 into my Anaconda environment. I am running Anaconda3. Unfortunately, the machine I need to install it on does not have internet access.
The basic way to install the package is to run conda install ipywidgets, but of course this gives the following error:
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/p
ro/noarch/
Could not connect to https://repo.continuum.io/pkgs/free/win-64/
Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
...
Solving package specifications: .
Package plan for installation in environment C:\Program Files\Anaconda3:
The following packages will be downloaded:
package | build
---------------------------|-----------------
ipywidgets-0.0.1 | np19py34_0 7 KB
The following NEW packages will be INSTALLED:
ipywidgets: 0.0.1-np19py34_0
Proceed ([y]/n)? y
Fetching packages ...
Could not connect to https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1
-np19py34_0.tar.bz2
Error: Connection error: HTTPSConnectionPool(host='repo.continuum.io', port=443)
: Max retries exceeded with url: /pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.t
ar.bz2 (Caused by ProtocolError('Connection aborted.', gaierror(11004, 'getaddri
nfo failed'))):
https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.tar.bz2
This makes sense, since the box can't access the internet.
I downloaded the ipywidgets tarball from the listed URL at https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.tar.bz2, and I ssh'ed it onto the box.
What command can I run on the box (it is a Windows 7 environment) so that it will run the install as local, looking at the downloaded tarball to unpack rather than trying to access the internet to get the file?
Download the whole package and its dependencies to some local directory
You can get it from PYPI ipywidgets
Let's consider you donwloaded from PYPI and you have ~/src/ipywidgets with ~/src/ipywidgets/setup.py which will have install_requires with a list of dep. in your /pypi directory. Like so:
install_requires=['hello', 'etc', ...]
To install your app and its dep. into the current python env., you've to do something like:
$ cd ~/src/ipywidgets
$ easy_install --always-unzip --allow-hosts=None --find-links=/pypi
Note that the build will fail if one or more dependencies are missing
If you want to use conda for this, might as well if you are already using anaconda, you should also be able to do:
conda install --offline PATH_TO_FILE/ipywidgets-0.0.1-np19py34_0.tar.bz2
Where, of course, PATH_TO_FILE is just the path to the file you've downloaded.

Categories