[Tutor] Moving a conda environment to an off-line computer

Henrique Castro henriquecsj at outlook.com
Mon Dec 3 05:54:48 EST 2018


Thank you for all the insightful replies!
It looks like the problem is exactly that deepchem is looking for an internet connection and crashing.
I'll see what I can do and provide some feedback here.

Again, thank you for using some of your time to take a look at this.

--
Henrique C. S. Junior

________________________________
From: Matt Ruffalo <matt.ruffalo at gmail.com>
Sent: Sunday, December 2, 2018 13:27
To: Henrique Castro; tutor at python.org
Subject: Re: Moving a conda environment to an off-line computer

Hi Henrique-

It is quite easy to transfer an Anaconda installation from one machine
to the other by copying all of the files -- I have done this repeatedly
with cluster compute environments. It is sometimes nicer to run `conda
upgrade --all` in a local VM and then `rsync` the updated Anaconda
installation between machines, since (as you mentioned) internet access
can sometimes be an issue.

It looks like you did everything correctly, and everything is "working"
as well as you would expect. As Alan mentioned, though, it looks like
the 'deepchem' package is trying to access the internet to load one of
its data sets, and this is what is failing. You could perhaps download
that data set and put it somewhere on the cluster where deepchem would
know where to look for it, to avoid having to download it, but I am
completely unfamiliar with deepchem so I can't offer any advice about
how to do that.

MMR...

On 30/11/18 08:47, Henrique Castro wrote:
> Dear colleagues,
> Soon I'll start to use one of the powerful computers on my university as a tool in my Ph.D. The computer does not have an internet connection and I need to find a way to install a conda environment on it.
> At first I tried to install and set the conda environment that I need in a computer with internet connection and taking care to copy everything in a path that is similar in the off-line computer (i.e I installed everything on /home/henrique/bin/anaconda3 at home and tried to copy everything to /home/henrique/bin/anaconda3 in the off-line computer - with the same .bashrc) but when I run conda I get an error(it works on my home computer):
>
> (deepchem) [henrique at europio qm7] $ python qm7_ANI.py
> /home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
>   from numpy.core.umath_tests import inner1d
> Traceback (most recent call last):
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 1318, in do_open
>     encode_chunked=req.has_header('Transfer-encoding'))
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 1239, in request
>     self._send_request(method, url, body, headers, encode_chunked)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 1285, in _send_request
>     self.endheaders(body, encode_chunked=encode_chunked)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 1234, in endheaders
>     self._send_output(message_body, encode_chunked=encode_chunked)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 1026, in _send_output
>     self.send(msg)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 964, in send
>     self.connect()
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/http/client.py", line 936, in connect
>     (self.host,self.port), self.timeout, self.source_address)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/socket.py", line 704, in create_connection
>     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/socket.py", line 745, in getaddrinfo
>     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
> socket.gaierror: [Errno -2] Name or service not known
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "qm7_ANI.py", line 15, in <module>
>     featurizer='BPSymmetryFunction', split='stratified', move_mean=False)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/site-packages/deepchem/molnet/load_function/qm7_datasets.py", line 50, in load_qm7_from_mat
>     'https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdeepchem.io.s3-website-us-west-1.amazonaws.com%2Fdatasets%2Fqm7.mat&data=02%7C01%7C%7C76013bc4f1c946bc00ea08d6586aa6b0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636793612418543403&sdata=v5exjG1hIZlYhQ9zNis87L4sMf%2BXmhIIBF4lGAC8hWU%3D&reserved=0'
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/site-packages/deepchem/utils/__init__.py", line 85, in download_url
>     urlretrieve(url, os.path.join(dest_dir, name))
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 248, in urlretrieve
>     with contextlib.closing(urlopen(url, data)) as fp:
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 223, in urlopen
>     return opener.open(url, data, timeout)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 526, in open
>     response = self._open(req, data)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 544, in _open
>     '_open', req)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 504, in _call_chain
>     result = func(*args)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 1346, in http_open
>     return self.do_open(http.client.HTTPConnection, req)
>   File "/home/henrique/bin/anaconda3/envs/deepchem/lib/python3.6/urllib/request.py", line 1320, in do_open
>     raise URLError(err)
> urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
>
> Any help is much appreciated
>
>
> --
> Henrique C. S. Junior
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Ftutor&data=02%7C01%7C%7C76013bc4f1c946bc00ea08d6586aa6b0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636793612418543403&sdata=c1luHrdUYbzCfn5%2BNc3c8awFxIJfkESVyNKZiAtCaa4%3D&reserved=0
>




More information about the Tutor mailing list