jdum / odfdo

python library for OpenDocument format (ODF)
Apache License 2.0
48 stars 11 forks source link

Some errors installing odfdo & solutions #25

Closed gmdelc66 closed 8 months ago

gmdelc66 commented 1 year ago

Hi, I had the following errors when installing ODFDO in my system, I have Ubuntu 20.04.6 and Python 3.10.4,

File "setup.py", line 2 1) SyntaxError: Non-ASCII character '\xc3' in file setup.py on line 2, but no encoding declared solution: EDIT edit setup.py and add # -- coding: utf-8 -- in the first line of code

2) ImportError: No module named setuptools solution: ~/odfdo$ pip install setuptools

3) File "setup.py", line 28, in from setuptools import find_packages, setup ImportError: No module named setuptools solution: activate my_envpy3 and YOU NEED TO RUN WITHOUT SUDO

These are the steps I followed and this is the way I corrected them, in case someone needs the solution, thank you

~$ git clone https://github.com/jdum/odfdo.git Cloning into 'odfdo'... remote: Enumerating objects: 627, done. remote: Counting objects: 100% (301/301), done. remote: Compressing objects: 100% (211/211), done. remote: Total 627 (delta 149), reused 150 (delta 90), pack-reused 326 Receiving objects: 100% (627/627), 4.08 MiB | 7.69 MiB/s, done. Resolving deltas: 100% (264/264), done. ~$ cd odfdo ~/odfdo$ sudo python setup.py install ~$ [sudo] password for: File "setup.py", line 2 SyntaxError: Non-ASCII character '\xc3' in file setup.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details EDIT edit setup.py and add # -- coding: utf-8 -- in the first line of code

~/odfdo$ sudo python setup.py install ImportError: No module named setuptools ~/odfdo$ pip install setuptools Requirement already satisfied: setuptools ~/odfdo$ sudo python setup.py install Traceback (most recent call last): File "setup.py", line 28, in from setuptools import find_packages, setup ImportError: No module named setuptools ~/odfdo$ conda activate my_envpy3 * IN my_envpy3 YOU NEED TO RUN WITHOUT SUDO

(my_envpy3):~/odfdo$ python setup.py install running install.... .... Finished processing dependencies for odfdo==3.3.2