I'm going to teach 10+ people beginning Python and need to install it in their own machines. I opted to go with Miniconda because I would like a painless Python 3 installation with iPython, matplotlib, etc. I am afraid that everyone installing via the network at the same time is going to clog it up. Is there a way to fetch all the packages along with their dependencies ahead of time and install it on their computers in the lecture?
EDIT: I suspect most will be running on Windows.
Anaconda Enterprise 4 Repository RequirementsWith an empty repository, a base install requires 2 GB. Internet access to download the files from Anaconda.org or a USB drive containing all of the files you need with alternate instructions for air gapped installations.
Conda analyzes each package for compatible dependencies, and how to install them without conflict.
In the Preferences dialog, select Enable offline mode to enter offline mode even if internet access is available. Using Navigator in offline mode is equivalent to using the command line conda commands create , install , remove , and update with the flag --offline so that conda does not connect to the internet.
The easiest way is to just download the Anaconda installers, and keep them on a few USB drives that you can pass around. This is pretty standard practice to do for tutorials like this.
If the people are using their own computers, you should strongly request that people install Anaconda before hand. If they are computer lab computers, install it yourself 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 may also want to do this for http://repo.continuum.io/pkgs/free/win-32/index.html), and pack them up in a tarball, and then you can conda install packages.tar
. Make sure you get all the dependencies, though. You might want to create a conda environment with the packages you want just to see what all is needed (conda create -n test package1 package2 ...
).
Dont know about miniconda but as other linux repo u can do this : (from 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 a directory
3.Create a script that will scan the packages and create a file apt-get update can read
4.Add a line to your sources.list pointing at your repository
Install dpkg-dev
Type in a terminal
sudo apt-get install dpkg-dev
The Directory
Create a directory where you will keep your packages. For this example, we'll use /usr/local/mydebs.
sudo mkdir -p /usr/local/mydebs
Now move your packages into the directory you've just created.
Previously downloaded Packages are generally stored on your system in the /var/cache/apt/archives directory. If you have installed apt-cacher you will have additional packages stored in its /packages directory.
The Script update-mydebs
It's a simple three liner:
#! /bin/bash
cd /usr/local/mydebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Cut and paste the 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 that directory in your PATH. It's a good place to put personal scripts). Next, make the script executable:
chmod u+x ~/bin/update-mydebs
How the script works: dpkg-scanpackages looks at all the packages in mydebs, and the output is compressed and written to a file (Packages.gz) that apt-get update can read (see below for a reference that explains this in excruciating detail). /dev/null is an empty file; it is a substitute for an override file which holds some additional information about the packages, which in this case is not really needed. See deb-override(5) if you want to know about it.
Sources.list
add the line
deb file:/usr/local/mydebs ./ to your /etc/apt/sources.list, and you're done.
CD Option
You can burn the directory containing the debs to a CD and use that as a repository as well (good for sharing between 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 with Synaptic,
aptitude and the apt commands:
apt-get
, apt-cache
, etc.
When you attempt to apt-get install, any dependencies will be resolved for you, as long as they can be met.
Badly made packages will probably fail, but you won't have endured dpkg hell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With