The original link: https://blog.csdn.net/ysy950803/article/details/52939708
Win:
- to RARLab first official download library files, http://www.rarlab.com/rar/UnRARDLL.exe, and installation; The best way to install is to choose the default path, usually in the C: Program Files (x86)\UnrarDLL\ directory; Then the important step is to add the environment variable, this computer (my computer) right click, properties, find advanced system Settings, advanced TAB under the environment variable, in the system variable (note not user variable) new, variable name input UNRAR_LIB_PATH, must be exactly the same, the value of the variable should pay special attention to! If you are a 64-bit system, type C:\Program Files (x86)\ Unrardll \x64\ Unrar64.dll, if you are a 32-bit system, type C:\Program Files (x86)\ Unrard.dll. Once you’re sure to save the environment variables, restart your PyCharm with the same code, and run it error-free. At this point the dependent libraries have been added to the system environment.
Linux needs to manually compile and generate the SO file itself, which is a bit more cumbersome:
- in the same way, the first to download the Source file, but it’s not like a Win for you packaging good, you need to download the Source code: http://www.rarlab.com/rar/unrarsrc-5.4.5.tar.gz, namely RARLab website to download the list of UnRAR Source, you can download the latest version; Make install-lib will automatically compile the library files. After the compilation is complete, use make install-lib to generate the libunrar.so file (normally located under /usr/lib). Finally, you still need to set the environment variable of your Linux system, find the profile file in the /etc/profile directory, which you can edit directly using the Vim /etc/profile command (even easier with WinSCP), add export UNRAR_LIB_PATH=/usr/lib/libunrar.so at the end of the profile, don’t put the comma in it. Save the variable successfully and then use the source /etc/profile command to make the variable effective. This way, if you run the py file again, you won’t get an error, at least you won’t be told that you can’t find the unrar library.
Sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install
Source: author: acerola
CSDN
,
https://blog.csdn.net/ysy950803/article/details/52939708 copyright statement: this article original articles for bloggers, reproduced please attach link to blog!
Read More:
- Solve the problem of prompt couldn’t find path to unrear library after installing unrear in Python
- Lookuperror: couldn’t find path to unrear library! two thousand and twenty
- LookupError: Couldn’t find path to unrar library.
- MacOS Catalina (system): xcrun: error: invalid active developer path(), missing xcrun at / Library
- Unable to find utility “instruments”, not a developer tool or in PATH
- Vs2019: solution nvcc total: cannot find compiler‘ cl.exe ‘ in PATH
- How to generate lib library with keil MDK and use lib Library
- STM32 added firmware library, but could not find h file
- [Solved] Golang Error: The system cannot find the path specified. [mkdir C:/xx/yy/]:
- [Solved] Mac git clone error:xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools)
- Error 0x00003 occurred during tableau installation. The system cannot find the specified path
- Vs2015 configuring OpenGL development environment: configuration of glfw library and glad Library
- [XMR] Could NOT find HWLOC (missing: HWLOC_LIBRARY HWLOC_INCLUDE_DIR)
- Configuring glfw library and glad Library in opengl-vs2015
- ClobberError: The package ‘xxx‘ cannot be installed due to a path collision for ‘xx‘ This path alre
- sys.path.append(), os.path.exists(), os.path.join() and os.makedirs() meaning
- Relative path and absolute path${ pageContext.request.contextPath }
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- OpenGL, such as glad library and glfw library, is incompatible
- Error running Eclipse: failed to load the JNI shared library