Reputation: 3318
I am trying to install xlwings
module in my Ubuntu machine but failed as below
pip3 install xlwings
Collecting xlwings
Using cached https://files.pythonhosted.org/packages/cc/c9/6bb1849dbee6e8a40beb9a0d21df9787bee45cda1d0bb575a0cd388dd260/xlwings-0.15.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-u90aes_a/xlwings/setup.py", line 33, in <module>
raise OSError("currently only Windows and OSX are supported.")
OSError: currently only Windows and OSX are supported.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-u90aes_a/xlwings/
What is the resolution of this error? Is xlwings not supported in Ubuntu? I also tried to install the same manually as below but failed too.
cd xlwings
python setup.py install
Any suggestion will be highly appreciated.
Update on 10th July 2019
I ran code export INSTALL_ON_LINUX=1
and then installed xlwings
. Installation was fine.
However when I tried to import xlwings
in Python, that failed with below error:
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xlwings
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/xlwings/__init__.py", line 44, in <module>
from . import _xlmac as xlplatform
File "/usr/local/lib/python3.6/dist-packages/xlwings/_xlmac.py", line 10, in <module>
import aem
ModuleNotFoundError: No module named 'aem'
I could not install package aem
with below error:
pip3 install aem
Collecting aem
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/aem/
Any solution will be highly appreciated.
Upvotes: 4
Views: 8427
Reputation: 89
please run this command before ruining pip install xlwings (for linux users)
export INSTALL_ON_LINUX=1
nice coding
Upvotes: 5
Reputation: 934
You could potentially install Anaconda for Windows within Wine and then also install Excel within Wine and then maybe, maybe (no promises), you might find that xlwings
... just... might... work... ... but there will likely be many speed bumps along the way...
Upvotes: 1