2017-05-17 23 views
1

pythonパッケージ "datefinder"をインストールしようとしていたのですが、正規表現とVisual C++に関するエラーが発生しました。私はStackoverflowの投稿の多くを見て、まだ解決策を見つけることができません。 1つの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\ 
+1

とインストールは、Visual Cの指示されたバージョンがインストールされている++? –

+0

Visual C++ 2017 redistributable - 14.10.25008(x64とx86の両方)とVisual Studio 2017をインストールしました。なぜ私にVisual C++を思い出させたのでしょうか? – xidchen

+0

これは、私がデバッグを開始する場所です。あなたが既に持っている場合、これをインストールする必要があると思うのはなぜですか? –

答えて

2

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 
+0

ありがとうございます。ソリューションが機能するかもしれません。私は別のアプローチを取って以来あなたのことをまだテストしていません。 – xidchen

関連する問題