tushar-rishav / code2pdf

:fax: Convert various source codes into pdf file with custom features
MIT License
347 stars 33 forks source link

Packaging name problem #25

Closed lpointal closed 4 years ago

lpointal commented 5 years ago

Hello, just installed via pip under anaconda, and tested via command-line.

The package directory is named Code2pdf (with uppercase C), but init.py import code2pdf.main (with lowercase c).

(base) pointal@motus:~$ code2pdf -h Traceback (most recent call last): File "/people/pointal/apps/anaconda3/bin/code2pdf", line 7, in from Code2pdf import main File "/people/pointal/apps/anaconda3/lib/python3.7/site-packages/Code2pdf/init.py", line 1, in from code2pdf import main ModuleNotFoundError: No module named 'code2pdf'

tushar-rishav commented 4 years ago

@lpointal Sorry about that and thanks for reporting. The error is due to Python3 incompatibility. Please refer : https://stackoverflow.com/a/48116074/3673031 https://www.python.org/dev/peps/pep-0328/#guido-s-decision

I don't have bandwidth this week. I can add a patch over weekend to make this module compatible with Python 3. Meanwhile, if possible, I suggest you to use Python 2 to unblock yourself. Here's how:

pipenv shell --two
pip install code2pdf
code2pdf -h

Btw, I'll be very happy to receive a PR fixing this issue. :)

Manav1918 commented 4 years ago

I have the same issue.. How to solve

batuhaneralp commented 4 years ago

1) Go to C:\Users\USER_NAME\AppData\Local\Programs\Python\Python36\Lib\site-packages\Code2pdf 2) Open init.py 3) Change "from code2pdf import main" to "from .code2pdf import main" 4) Install PyQt4 (for windows, you can find whl files in https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4 ) 5) Run your code and that should be it

Manav1918 commented 4 years ago

What's the error? Send ScreenShot

Thank you! Pawan, CID An Education Hub

On Tue 17 Mar, 2020, 7:43 PM batuhaneralp, notifications@github.com wrote:

  1. Go to C:\Users\USER_NAME\AppData\Local\Programs\Python\Python36\Lib\site-packages\Code2pdf
  2. Open init.py
  3. Change "from code2pdf import main" to "from .code2pdf import main"
  4. Install PyQt4 (for windows, you can find whl files in https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4 )
  5. Run your code and that should be it

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tushar-rishav/code2pdf/issues/25#issuecomment-600094179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ25HXXW5B2X5U4BCLQQNX3RH6ARZANCNFSM4HNSLLNA .

tushar-rishav commented 4 years ago

This issue has been fixed in https://github.com/tushar-rishav/code2pdf/pull/29 My sincere thanks to @Thommy257 for the contribution.

Manav1918 commented 4 years ago

Thank you! Pawan, CID An Education Hub

On Mon 29 Jun, 2020, 11:22 PM Tushar Gautam, notifications@github.com wrote:

Closed #25 https://github.com/tushar-rishav/code2pdf/issues/25.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tushar-rishav/code2pdf/issues/25#event-3493861427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ25HXWOTIGGAARTKV2AMODRZDIGBANCNFSM4HNSLLNA .