gpt4 book ai didi

python - pip install datefinder 出错

转载 作者:行者123 更新时间:2023-12-01 02:58:28 25 4
gpt4 key购买 nike

当我尝试 pip install python 包“datefinder”时,我遇到了有关正则表达式和 Visual C++ 的错误。我查看了很多 Stackoverflow 帖子,但尚未找到解决方案。一post类似,但没有得到回复。任何评论表示赞赏!

C:\Users\sheldonc\Downloads>pip install datefinder-0.6.1-py2.py3-none-any.whl

Processing c:\users\sheldonc\downloads\datefinder-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil>=2.4.2 in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from datefinder==0.6.1)
Collecting regex==2016.01.10 (from datefinder==0.6.1)
Using cached regex-2016.01.10.tar.gz
Requirement already satisfied: pytz in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from datefinder==0.6.1)
Requirement already satisfied: six>=1.5 in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from python-dateutil>=2.4.2->datefinder==0.6.1)
Installing collected packages: regex, datefinder
Running setup.py install for regex ... error
Complete output from command c:\users\sheldonc\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sheldonc\\AppData\\Local\\Temp\\pip-build-iv39m2te\\regex\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\sheldonc\AppData\Local\Temp\pip-ht1mrgoz-record\install-record.txt --single-version-externally-managed --compile:
c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py:334: UserWarning: Normalizing '2016.01.10' to '2016.1.10'
normalized_version,
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
copying Python3\regex.py -> build\lib.win32-3.6
copying Python3\_regex_core.py -> build\lib.win32-3.6
copying Python3\test_regex.py -> build\lib.win32-3.6
running build_ext
building '_regex' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

----------------------------------------
Command "c:\users\sheldonc\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sheldonc\\AppData\\Local\\Temp\\pip-build-iv39m2te\\regex\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\sheldonc\AppData\Local\Temp\pip-ht1mrgoz-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sheldonc\AppData\Local\Temp\pip-build-iv39m2te\regex\

最佳答案

setup.py 中存在正则表达式版本的硬编码值。您需要从https://github.com/akoumjian/datefinder下载源代码并将正则表达式版本从 regex==2016.01.10 更改为 regex>=2016.01.10 或您的最新版本。例如:

line 85: install_requires=['regex>=2016.01.10', 'python-dateutil>=2.4.2', 'pytz'],

然后安装

pip install ./path_to_datefinder_source

关于python - pip install datefinder 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44016287/

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