November 8, 2016 · ucsmsdk ucspython

ucsmsdk offline pip install with dependencies

The server you want to install the SDK on sometimes might not have internet connectivity.
The following facilitate a offline install,

On a machine with internet connectivity (this could be your PC or Mac),

pip install --download /path/to/save/dependencies  
pip install --no-index --find-links /path/to/save/dependencies  

Example:

➜  ~ pip install ucsmsdk --download /tmp/ucsmsdk
DEPRECATION: pip install --download has been deprecated and will be removed in the future. Pip now has a download command that should be used instead.  
Collecting ucsmsdk  
  Downloading ucsmsdk-0.9.1.1-py2.py3-none-any.whl (5.9MB)
    100% |████████████████████████████████| 5.9MB 218kB/s
  Saved /tmp/ucsmsdk/ucsmsdk-0.9.1.1-py2.py3-none-any.whl
Collecting pyparsing (from ucsmsdk)  
  Using cached pyparsing-2.1.5-py2.py3-none-any.whl
  Saved /tmp/ucsmsdk/pyparsing-2.1.5-py2.py3-none-any.whl
Successfully downloaded ucsmsdk pyparsing  
➜  ~
➜  ~ ls -l /tmp/ucsmsdk
total 11552  
-rw-r--r--  1 vvb  wheel    42540 Jul 20 10:16 pyparsing-2.1.5-py2.py3-none-any.whl
-rw-r--r--  1 vvb  wheel  5867759 Jul 20 10:16 ucsmsdk-0.9.1.1-py2.py3-none-any.whl
➜  ~
➜  ~ sudo pip install ~/work/tpi/release/ucsmsdk/dist/ucsmsdk-0.9.1.1.tar.gz --no-index --find-links /tmp/ucsmsdk
The directory '/Users/vvb/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.  
Ignoring indexes: https://pypi.python.org/simple  
The directory '/Users/vvb/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.  
Processing ./work/tpi/release/ucsmsdk/dist/ucsmsdk-0.9.1.1.tar.gz  
Requirement already satisfied (use --upgrade to upgrade): pyparsing in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from ucsmsdk==0.9.1.1)  
Installing collected packages: ucsmsdk  
  Found existing installation: ucsmsdk 0.9.1.0
    Uninstalling ucsmsdk-0.9.1.0:
      Successfully uninstalled ucsmsdk-0.9.1.0
  Running setup.py install for ucsmsdk ... done
Successfully installed ucsmsdk-0.9.1.1  
➜  ~
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket