RichardJRL / pocketmagstopdf

Download pocketmags magazines in PDF format from the HTML5 reader
Creative Commons Zero v1.0 Universal
41 stars 8 forks source link

"Reports"` #9

Closed jdmba closed 1 year ago

jdmba commented 1 year ago

I am less than a python newbie, so please forgive me.

Managed to download python and followed the instructions for the dependencies.

I get this when I try to run it

Traceback (most recent call last): File "pocketmagstopdf.py", line 134, in import requests as requests ModuleNotFoundError: No module named 'requests'

Any idea how to fix?

RichardJRL commented 1 year ago

It looks like you don't have the python requests module on your system yet. You'll need to install it but I don't know what OS you are using so here are some basic instructions to cover Windows, Mac and Linux:

Windows

  1. Open the command prompt by pressing the Windows key + R, typing cmd and pressing Enter.
  2. Type pip install requests and press Enter.
  3. Wait for the installation to complete.
  4. Test that the module has been installed by running your Python program again.

Mac

  1. Open the Terminal application by going to Applications -> Utilities -> Terminal.
  2. Type pip3 install requests and press Enter.
  3. Wait for the installation to complete.
  4. Test that the module has been installed by running your Python program again.

Linux

  1. Open up a terminal window.
  2. Type sudo apt-get update and press Enter.
  3. Type sudo apt-get install python3-pip and press Enter.
  4. Type pip3 install request and press Enter.
  5. Wait for the installation to complete.
  6. Test that the module has been installed by running your Python program again.
jdmba commented 1 year ago

Thank you. It's windows. Actually, it fails every dependency for version number issues; claiming that the version numbers in the requirements.txt file are too high. Pillow will only go to 8.4.0 and not 9.3.0 for example. Requests will only go to 2.27.1 and not 2.28.1

So if I do the install without the version numbers from the requirements.txt file, it will fail out on pip install reportlab claiming

" building 'reportlab.lib._rl_accel' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

ERROR: Command errored out with exit status 1: 'c:\users\ira\appdata\local\programs\python\python36-32\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ira\AppData\Local\Temp\pip-install-zwe997m6\reportlab_9f3b7fa9cbe14376b29a870e107e0ab7\setup.py'"'"'; file='"'"'C:\Users\ira\AppData\Local\Temp\pip-install-zwe997m6\reportlab_9f3b7fa9cbe14376b29a870e107e0ab7\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ira\AppData\Local\Temp\pip-record-jw264y56\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\xxx\appdata\local\programs\python\python36-32\Include\reportlab' Check the logs for full command output. "