{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Want to pip install staintools and spams without the internet access?!\n\nKaggle by default somehow decompresses .tar.gz file uploaded in input folder, thus making it unable to process \n!pip install --no-index --find-links=../input/install staintools\n\nHowever, I tried commands below and it worked!\n\n1. Download specified version of files. I downloaded from websites below.\n> * https://pypi.org/project/spams/2.6.1/#files\n> * https://pypi.org/project/staintools/\n\n2. Rename xxx.tar.gz to xxx.tar.gz.aaaaa for example, to the one kaggle cannnot automatically decompress.\n\n3. Upload the xxx.tar.gz.aaaaa files to input folder.\n\n4. Execute the commands below(please uncomment). It first copies xxx.tar.gz.aaaaa files to your working folder, which you can edit the files. Then rename the files to without .aaaaa, and then you can finally execute pip install...!\n\n","metadata":{}},{"cell_type":"code","source":"# !cp ../input/installall2/staintools-2.1.2.tar.gz.aaaaa ./\n# !cp ../input/installall2/spams-2.6.1.tar.gz.aaaaa ./\n# !mv staintools-2.1.2.tar.gz.aaaaa staintools-2.1.2.tar.gz\n# !pip install --no-index --find-links=./ staintools\n# !mv spams-2.6.1.tar.gz.aaaaa spams-2.6.1.tar.gz\n# !pip install --no-index --find-links=./ spams","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"I understand there must be more elegant/better way to do this. Please let me know if you know one!","metadata":{}}]}