gpt4 book ai didi

python - 无法在我的 Ubuntu 机器上安装 'xlwings'

转载 作者:行者123 更新时间:2023-12-04 12:43:28 26 4
gpt4 key购买 nike

我正在尝试安装 xlwings模块在我的 Ubuntu 机器中,但失败如下

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/

这个错误的解决方法是什么? Ubuntu 不支持 xlwings 吗?我也尝试像下面一样手动安装,但也失败了。
cd xlwings
python setup.py install

任何建议将不胜感激。

2019 年 7 月 10 日更新

我跑了代码 export INSTALL_ON_LINUX=1然后安装 xlwings .安装很好。
但是,当我尝试导入 xlwings 时在 Python 中,失败并出现以下错误:
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'

我无法安装包 aem有以下错误:
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/

任何解决方案将不胜感激。

最佳答案

请在破坏 pip install xlwings 之前运行此命令(适用于 linux 用户)

导出 INSTALL_ON_LINUX=1

很好的编码

关于python - 无法在我的 Ubuntu 机器上安装 'xlwings',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55121618/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com