Skip to content

Commit

Permalink
fix: add pip install PyPDF2 in import section
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Oct 5, 2022
1 parent 4a72bf8 commit 1e3e83a
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions PDF/PDF_Merge_Multipe_PDFs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "potential-surfing",
"metadata": {
"papermill": {},
Expand All @@ -98,7 +98,11 @@
"import io\n",
"import requests\n",
"from urllib.parse import urlparse\n",
"from PyPDF2 import PdfFileReader, PdfFileWriter"
"try:\n",
" from PyPDF2 import PdfFileReader, PdfFileWriter\n",
"except:\n",
" !pip install PyPDF2 --user\n",
" from PyPDF2 import PdfFileReader, PdfFileWriter"
]
},
{
Expand All @@ -114,12 +118,15 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "46af0552",
"metadata": {},
"outputs": [],
"source": [
"input_pdf_files = [\"https://bitcoin.org/bitcoin.pdf\", \"https://ethereum.org/669c9e2e2027310b6b3cdce6e1c52962/Ethereum_Whitepaper_-_Buterin_2014.pdf\"]\n",
"input_pdf_files = [\n",
" \"https://bitcoin.org/bitcoin.pdf\",\n",
" \"https://ethereum.org/669c9e2e2027310b6b3cdce6e1c52962/Ethereum_Whitepaper_-_Buterin_2014.pdf\"\n",
"]\n",
"ouput_pdf_file = \"merge.pdf\""
]
},
Expand All @@ -144,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "854b8f94",
"metadata": {},
"outputs": [],
Expand All @@ -170,7 +177,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"id": "crude-louisville",
"metadata": {
"papermill": {},
Expand Down Expand Up @@ -218,7 +225,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"id": "ebdb1ba6",
"metadata": {},
"outputs": [],
Expand All @@ -239,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"id": "9c4e3b7b-6440-4844-8054-265f1aec65eb",
"metadata": {
"papermill": {},
Expand All @@ -265,7 +272,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "c4279612",
"metadata": {
"papermill": {},
Expand All @@ -281,7 +288,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -295,7 +302,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.6"
},
"papermill": {
"default_parameters": {},
Expand Down

0 comments on commit 1e3e83a

Please sign in to comment.