Discussion:
[spyder] Clone full Anaconda system to a PC without internet connection.
jstechg
2018-10-23 20:56:48 UTC
Permalink
I am starting to work with python and I have to clone the "Anaconda +
Spyder" environment that was installed some time ago on a Windwos PC with
an internet connection to another Windows PC that does not have an internet
connection and does not have anaconda or spyder installed.

I have been looking for information on the internet and I have tried to do
it in the following way:

STEP 1:

- On the 1st PC: Download Anaconda distribution and copy it on a USB
drive.
- On the 2nd PC: Copy Anaconda distribution installer from USB drive to
hard disk and install it.

STEP 2:
Export the Anaconda environment from 1st PC to 2nd PC using:

- On the 1st PC: conda env export > environment.yml
- On the 2nd PC: conda env create -f environment.yml

The problem is in step 2, which gives me errors.

On 1st PC (Windows) open an "command promt" and type:

cd C:\Program Files\Anaconda3 (We go to the installation directory)

conda env export > "C:\Users\user_name\My Documents\environment.yml"

Then I get this error message:

Error: Unable to determine environment
Please re-run this command with one of the following options:
* Provide an environment name via --name or -n
* Re-run this command inside an activated conda environment.

I reproduce the output obtained when executing the command: conda info

Current conda install:
platform: win-32
Conda version: 4.1.6
Conda-env version: 2.5.1
Conda-build version: 1.21.3
python version: 3.5.2.final.0
requests version: 2.10.0
root environment: C:\Program Files\Anaconda3 (read only)
default environment: C:\Program Files\Anaconda3
envs directories: C:\Users\user_name.conda\envs
C:\Users\user_name\envs
C:\Program Files\Anaconda3\envs
package cache: C:\Users\user_name.conda\envs.pkgs
C:\Users\user_name\envs.pkgs
C:\Program Files\Anaconda3\pkgs
channel URLs: https:/repo.continuum.io/pkgs/free/win-32/
https:/repo.continuum.io/pkgs/free/noarch/
https:/repo.continuum.io/pkgs/pro/win-32/
https:/repo.continuum.io/pkgs/pro/noarch/
config file: None
Offline mode: False
is foreign system: False

After analyzing the output of this command, I tried again to export the
Anaconda environment as follows:
cd C:\Users\user_name.conda\envs
conda env export > "C:\Users\user_name\My Documents\environment.yml"

Then I get this error message:
usage: conda-env-script.py [-h]
(attach,create,export,list,remove,upload,update)
conda-env-script.py: error: invalid choice: 'C:\Program Files\Anaconda3'
(choose from 'attach','create','export','list','remove','upload','update')
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.
jstechg
2018-10-24 07:51:44 UTC
Permalink
I have been able to execute the "conda export" command successfully on the
second PC, in the following way:
cd C:\Program Files\Anaconda3
conda env export -n user_name > C:\users\user_name\Documents\environment.yml

However, I am confused with the content of the file obtained, since I
expected to obtain a file that allows me to clone the configuration of the
first PC on the second PC, and yet, what I get is a text file with a size
of 93 bytes and the following content:

name: user_name
prefix: C:\Users\user_name\.conda\envs\user_name

Also, in the first PC, where I have executed "conda export", the next
directory does not exist:
C:\Users\user_name\.conda\

How can I solve this?
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.
Loading...