Python offline install Unrar library

Source: Internet
Author: User

Offline installation of the Python Library Reference:

Http://www.cnblogs.com/michael-xiang/p/5690746.html

Error issues for installing Unrar reference:

Https://github.com/matiasb/python-unrar/blob/master/README.md

http://blog.csdn.net/ysy950803/article/details/52939708

Objective:

Networked Machine WINDOW10

Ready for offline installation of the machine CENOS7

Go to the Chase

1. Refer to installation Unrar installing Unrar in Window environment

First refer to the installation of Windows installation Unrar then download Unrar source in http://www.rarlab.com/rar/unrarsrc-5.4.5.tar.gz download and then Upload the downloaded file to the directory of the Linux machine (Shichao) and then unzip the tar zxf unrarsrc-5.4.5.tar.gz get Unrar file, there are many CPP files need to be compiled to transfer to this directory run make Lib (if the C + + Command not found run yum install gcc gcc-c++ installation) then install Unrar Library, run make install-lib (if this step is missing the error that will not find the library when importing raise Lookupe Rror ("couldn ' t find path to Unrar library.") Lookuperror:couldn ' t find path to Unrar library.)
Modify/ect/profile
Finally the environment is ready (refer to the error resolution for installing Unrar under Linux)

  

2. Refer to offline PIP installation Library method for offline packaging

Under the PYTHON27 installation directory, create the folder Packages_offline, and execute the following package command under script that transfers the location of the offline save package to the Python installation directory pip freeze >requirements.txtpip Install--download d:\python27\packages_ofline Unrar can see unrar-0.3.tar.gz compression package uploaded to Linux machine under directory Packages_offline Under the Shichao directory
Unzip the tar zcf unrar-0.3.tar.gz
Get unrar-0.3
setup.py files can be found in the directory unrar-0.3

Successful execution

3. The above two steps do not have a relationship, eventually entering the Python environment in Linux, you can execute from unrar import rarfile

If the download site of unrar-0.3 execution Setup may appear in Linux, only the current session can import Unrar issues.

Python offline install Unrar library

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.