【发布时间】:2017-05-17 05:26:14
【问题描述】:
当我尝试 pip install python 包“datefinder”时,我遇到了关于 regex 和 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\
【问题讨论】:
-
您是否安装了指定版本的 Visual C++?
-
我已经安装了visual c++ 2017 redistributable - 14.10.25008(x64和x86)和visual studio 2017。我想知道为什么它让我想起了visual c++。
-
嗯,这就是我要开始调试的地方。如果你已经安装了,为什么它认为你还需要安装它?
-
我发现了一个类似的帖子 (stackoverflow.com/questions/27670365/…)。在那篇文章中,错误消息中提到的 c++ 版本与作者拥有的版本不同。不过,我的也是一样的。尽管如此,在添加了一些系统变量后,pip install 仍然有同样的错误。
-
我有另一个相关的帖子。这是link
标签: python pip python-wheel