Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Following this tutorial, I don't know how to reproduce step 2 on a windows machine:

apt-offline get C:\apt-offline.sig --threads 5

How do I install apt-offline on a Windows machine so I can run this command?

This is what I have tried:
I installed Python 2.7.5 on Windows and downloaded the apt-offline package.
Then I ran the setup.py script contained in the folder.
First with the build parameter and then with the install parameter as described in the INSTALL document.

The only way I can get apt-offline to work is with:

cd C:\apt-offline-1.3
python apt-offline

It never works by entering apt-offline or python apt-offline into cmd.

share|improve this question

migrated from unix.stackexchange.com Sep 10 '13 at 20:42

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

    
Tell us what you've done. Have you successfully installed apt-offline on Windows? –  terdon Sep 10 '13 at 15:11
    
How did you get to download apt-offline on windows? I can't find any download link anywhere. –  Tomáš Zato Jun 19 at 21:40

1 Answer 1

up vote 2 down vote accepted

That's a feature! Windows, just like *nix has a $PATH, a list of directories in which it will search for executable files when a program's name is given in the command line. If a given executable is not in one of those directories, you will need to use its path (not to be confused with $PATH) to run it.

So, you have a few choices:

  • You can add the directory in which you have saved apt-offline to your $PATH (source):

    1. From the Desktop, right-click My Computer and click Properties.
    2. Click Advanced System Settings link in the left column.
    3. In the System Properties window click the Environment Variables button.
  • You can use the complete path to run the program:

    python C:\apt-offline-1.3\apt-offline
    
  • You can change directories to C:\apt-offline-1.3\ and run it from there which is exactly what you've been doing.

share|improve this answer
    
Thank you for your answer! But why do I have to run through the installation process at all as mentioned on the apt-offline GitHub page. Shouldn't this take care of integrating the command apt-offline into Windows? –  Christian Heinrichs Sep 11 '13 at 14:13
    
@codingaround apparently not. Since most things don't happen from the command line in Windows, adding a program to the PATH might not always happen. For example, windows shortcuts use absolute paths not just the program's name. The installation probably just links the program to the necessary libraries, places files in the correct folders etc. –  terdon Sep 11 '13 at 17:21
    
The setup.py installed apt-offline into the site-packages folder of Python 2.7.5. Is this what you mean by "places files in the correct folders etc."? So, is there no reason to run the setup.py at all? –  Christian Heinrichs Sep 11 '13 at 19:49
    
@codingaround I don't know, I'd have to read the source. Does it perhaps compile something? Collect information about your system? Set up environment variables? –  terdon Sep 11 '13 at 19:51
    
The setup.py script does not seem to take care of commands at all. This answer on StackOverflow explains it, I think. While the setup script does not contain entry_point, because it's not supported in distutils, there is a line called scripts=['apt-offline', 'apt-offline-gui'] –  Christian Heinrichs Sep 11 '13 at 20:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.