Python Forum
How to install odfpy? (or a better alternative?)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to install odfpy? (or a better alternative?)
#1
How can I install odfpy?
I tried
python -m pip install setup.py
from the directory in which I unpacked odfpy-master.zip.
I got only an error:
Could not find any downloads that satisfy the requirement setup.py
Well, why at all? The files are stord  on my PC. No need to download anything.

The logfile says probably only the same, but with more words:
Output:
------------------------------------------------------------ G:\Programme\pythonxy\Python27\lib\site-packages\pip\__main__.py run on 10/05/16 17:41:11 Downloading/unpacking setup.py   Getting page https://pypi.python.org/simple/setup.py/   Could not fetch URL https://pypi.python.org/simple/setup.py/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/setup.py/ (Caused by <class 'socket.gaierror'>: [Errno 11001] getaddrinfo failed)   Will skip URL https://pypi.python.org/simple/setup.py/ when looking for download links for setup.py   Getting page https://pypi.python.org/simple/   Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'socket.gaierror'>: [Errno 11001] getaddrinfo failed)   Will skip URL https://pypi.python.org/simple/ when looking for download links for setup.py   Cannot fetch index base URL https://pypi.python.org/simple/   URLs to search for versions for setup.py:   * https://pypi.python.org/simple/setup.py/   Getting page https://pypi.python.org/simple/setup.py/   Could not fetch URL https://pypi.python.org/simple/setup.py/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/setup.py/ (Caused by <class 'socket.gaierror'>: [Errno 11001] getaddrinfo failed)   Will skip URL https://pypi.python.org/simple/setup.py/ when looking for download links for setup.py   Could not find any downloads that satisfy the requirement setup.py Cleaning up...   Removing temporary dir g:\dokume~1\k\lokale~1\temp\pip_build_K... No distributions at all found for setup.py Exception information: Traceback (most recent call last):   File "G:\Programme\pythonxy\Python27\lib\site-packages\pip\basecommand.py", line 122, in main     status = self.run(options, args)   File "G:\Programme\pythonxy\Python27\lib\site-packages\pip\commands\install.py", line 279, in run     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)   File "G:\Programme\pythonxy\Python27\lib\site-packages\pip\req.py", line 1192, in prepare_files     url = finder.find_requirement(req_to_install, upgrade=self.upgrade)   File "G:\Programme\pythonxy\Python27\lib\site-packages\pip\index.py", line 281, in find_requirement     raise DistributionNotFound('No distributions at all found for %s' % req) DistributionNotFound: No distributions at all found for setup.py
So, how can I install the stored odfpy?
Or is there an better alternative if I simply want to read the contents of an OO/LO spreadsheet (*.ods)?
Reply
#2
What happens if you do
$ python setup.py
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
I get another error, basically:
 error: no commands supplied
There is some more text about usage of setup.py, but I guess that's not so important.

I'm working with WinXP and Python 2.7.
Reply
#4
Try full path to python.exe as a command.
For example:

cd path_to_setup_file
C:\>Python2.7\python27.exe setup.py

I am using Linux I hope some Windows guy will answer adequate. I am guessing now.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#5
Result is the same.
It says:
Output:
usage: setup.py [global.opts] cmd1 [cmd2] [cmd2_opts] ...]   or: setup.py --help [cmd1 cmd2...]   or: setup.py --help-commands   or: setup.py cmd --help error: no command supplied
By the way, in the Help there is a comment: " If this text is within a popup that you cannot copy the text out of, please use this tool to acquire the text from within it (for windows users)."
Unfortunately, there is no link provided for "this tool" :-( .... But it might be helpful, I guess.
Reply
#6
run in the terminal
python setup.py --help-commands

I am guessing it will print available setup.py commands
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#7
Thanks a lot - that is working now!
From the list I got I picked

Output:
...> python setup.py build ...> python setup.py install

and that makes the python command 'import odf' working.

Many, many thanks for the fast and patient help :-) !
Reply
#8
Good! Just read the output. I didn't done anything else.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Twilio alternative jmair 3 3,892 Feb-08-2024, 01:55 PM
Last Post: Sharmi
  Pillow alternative? kucingkembar 4 866 Jul-27-2023, 10:50 AM
Last Post: Larz60+
  Alternative for Cairosvg? Maryan 0 2,450 Oct-26-2020, 01:27 PM
Last Post: Maryan
  another alternative to np.interp evelynow 1 2,918 Aug-22-2019, 03:32 PM
Last Post: Larz60+
  Multithreading alternative MartinV279 1 2,777 Aug-01-2019, 11:41 PM
Last Post: scidam
  Array alternative oldcity 3 3,470 Oct-01-2018, 10:03 PM
Last Post: ichabod801
  If elif else alternative brocq_18 13 12,207 Apr-12-2017, 06:53 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020