Is it possible to fully establish autonomous communication with dependencies?

I am going to teach 10+ people starting out Python, and they need to be installed on their machines. I decided to go with Miniconda because I would like to have a painless Python 3 installation with iPython, matplotlib, etc. I am afraid that everyone who will install over the network at the same time is going to clog it. Is there a way to get all the packages along with their dependencies ahead of time and install them on their computers in a lecture?

EDIT: I suspect most of them will work on Windows.

+6
source share
2 answers

The easiest way is to simply download the Anaconda installers and save them on multiple USB drives that you can bypass. This is a fairly standard practice for such tutorials.

If people use their own computers, you should urge people to install Anaconda before starting work. If it is a computer lab computer, install it immediately before the tutorial.


As a more manual way, you can download the packages you need from http://repo.continuum.io/pkgs/free/osx-64/index.html (you can also do this for http://repo.continuum.io/ pkgs / free / win-32 / index.html ) and pack them in tarball, and then you can conda install packages.tar . However, make sure you get all the dependencies. You might want to create a conda environment with packages that you just want to see what you need ( conda create -n test package1 package2 ... ).

+4
source

I don't know about miniconda, but like other Linux repos, you can do this: (from the ubuntu forum: https://askubuntu.com/questions/170348/how-to-make-my-own-local-repository )

There are 4 steps to setting up a simple repository for yourself.

1.install dpkg-dev

2. Put the packages in the directory

3.Create a script that scans the packages and creates the file. apt-get update can read

4.Add a line to your .list source, pointing to your repository

Install dpkg-dev

Enter terminal

 sudo apt-get install dpkg-dev 

Directory

Create a directory in which you will store your packages. In this example, we will use / usr / local / mydebs.

 sudo mkdir -p /usr/local/mydebs 

Now move your packages to the newly created directory.

Previously downloaded packages are usually stored on your system in the / var / cache / apt / archives directory. If you installed apt-cacher, you will have additional packages stored in the / packages directory.

script update-mydebs

This is a simple three liner:

  #! /bin/bash cd /usr/local/mydebs dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz 

Cut and paste above into gedit and save it as update-mydebs in ~ / bin. (the tilde '~' means your home directory. If ~ / bin does not exist, create it: Ubuntu will put this directory in your PATH. Good place to put personal scripts). Then create an executable script file:

 chmod u+x ~/bin/update-mydebs 

How the script works: dpkg-scanpackages looks through all the packages in mydebs, and the result is compressed and written to a file (Packages.gz) that can read apt-get (see the link below explaining this in a painful detail) ./ dev / null - empty file; it replaces the override file, which contains some additional information about the packages, which in this case is really not needed. See Deb-override (5) for more information.

sources.list

add line

deb file: /usr/local/mydebs./ to your /etc/apt/sources.list, and you're done.

CD option

You can write the directory containing deb to the CD and use it as a repository (good for sharing computers). To use the CD as a repository, simply run

 sudo apt-cdrom add Using the Repository 

Whenever you put a new deb in the mydebs directory, run

 sudo update-mydebs sudo apt-get update 

Now your local packages can be manipulated using Synaptic, aptitude and the apt command: apt-get , apt-cache , etc. When you try apt-get install, any dependencies will be resolved for you if they can be executed.

Poorly made packages are likely to fail, but you will not tolerate the infernal dpkg.

+1
source

All Articles