오류: Python에서 IronPDF를 찾지 못했습니다.
다음 명령어를 사용하여 pip를 통해 .NET 6.0 SDK와 IronPdf를 설치했다고 가정합니다.
pip install ironpdf
파이썬 스크립트를 실행하는 동안 아래와 같은 예외가 발생할 수 있습니다.
Exception has occurred: Exception
Failed to locate IronPdf.Slim.dll at 'C:\Users\Name\AppData\Local\Programs\Python\Python311/IronPdf.Slim'. Please see /troubleshooting/quick-ironpdf-troubleshooting/ for more information
File "C:\Users\Name\OneDrive\Documents\IronPdfPythonNew\working\viewport.py", line 1, in <module>
from ironpdf import *
Exception: Failed to locate IronPdf.Slim.dll at 'C:\Users\Name\AppData\Local\Programs\Python\Python311/IronPdf.Slim'. Please see https://ironpdf.com/troubleshooting/quick-ironpdf-troubleshooting/ for more information해결책
IronPdf.Slim가 포함된 디렉터리는 다음과 같이 지정할 수 있습니다.
import sys
# Set the path to include the directory containing the IronPdf.Slim files.
# Users can determine this location by running `pip uninstall ironpdf` and pressing `N` to view the installation path.
sys.path.append('/path/to/python/packages')import sys
# Set the path to include the directory containing the IronPdf.Slim files.
# Users can determine this location by running `pip uninstall ironpdf` and pressing `N` to view the installation path.
sys.path.append('/path/to/python/packages')예를 들어
import sys
# Add the directory of the IronPdf installation to the path for module resolution.
# This should point to the root directory of where IronPdf is installed.
sys.path.append(r'C:\Users\lyty1\AppData\Local\Programs\Python\Python311\Lib\site-packages')
from ironpdf import *
# Instantiate Renderer
renderer = ChromePdfRenderer()
# Create a PDF from a URL or local file path
pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/")
# Export to a file or Stream
pdf.SaveAs("url.pdf")import sys
# Add the directory of the IronPdf installation to the path for module resolution.
# This should point to the root directory of where IronPdf is installed.
sys.path.append(r'C:\Users\lyty1\AppData\Local\Programs\Python\Python311\Lib\site-packages')
from ironpdf import *
# Instantiate Renderer
renderer = ChromePdfRenderer()
# Create a PDF from a URL or local file path
pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/")
# Export to a file or Stream
pdf.SaveAs("url.pdf")이유
대부분의 타사 라이브러리는 "site-packages"라는 디렉터리에 설치되며, 이 디렉터리는 Python 설치 디렉터리 내에 있거나 가상 환경을 사용하는 경우 가상 환경 디렉터리 내에 있습니다. 이 디렉토리는 파이썬 인터프리터에서 접근할 수 있는 디렉토리입니다.
IronPDF는 IronPdf.Slim와 IronPdf.Native.Chrome.Windows를 모두 설치합니다.
정확한 위치는 운영 체제 및 Python 구성에 따라 다를 수 있습니다.







