benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.51k stars 606 forks source link

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools #76

Closed opokualbert closed 6 years ago

opokualbert commented 6 years ago

Hello, I tried pip installing implicit and I get the error below. Is there any work around? running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\implicit copying implicit\als.py -> build\lib.win-amd64-3.6\implicit copying implicit\approximate_als.py -> build\lib.win-amd64-3.6\implicit copying implicit\nearest_neighbours.py -> build\lib.win-amd64-3.6\implicit copying implicit\recommender_base.py -> build\lib.win-amd64-3.6\implicit copying implicit\utils.py -> build\lib.win-amd64-3.6\implicit copying implicit__init__.py -> build\lib.win-amd64-3.6\implicit running build_ext building 'implicit._als' 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

benfred commented 6 years ago

You need to install the visual c++ build tools. The link in the error message seems like it's dead, but you can download them here: https://visualstudio.microsoft.com/visual-cpp-build-tools/

Note that while the error is calling for vc++ 14.0 - everything will work with newer versions of visual c++.

opokualbert commented 6 years ago

Thanks @benfred

rth commented 6 years ago

The package is now distributed on conda forge (see https://github.com/conda-forge/implicit-feedstock), it can also be installed without needing a compiler on Linux, MacOS and Windows with,

conda install -c conda-forge implicit
benfred commented 6 years ago

awesome! thanks @rth - having prebuilt binaries on conda-forge will really help out here.

To update - do I just need to submit a PR changing the sha256/version lines here https://github.com/conda-forge/implicit-feedstock/blob/master/recipe/meta.yaml#L2 ?

rth commented 6 years ago

To update - do I just need to submit a PR changing the sha256/version lines here

Yes, also just the next time one would need to reset the build number to 0, and if you want, add yourself to the recipe-maintainers section which will give you write permissions on that repo..

benfred commented 6 years ago

done =) https://github.com/conda-forge/implicit-feedstock/pull/4

hadpro24 commented 6 years ago

Yes, Help Me

TSAIJK commented 6 years ago

I meet this problem when I am trying to install wordcloud...

jaidenjohn commented 6 years ago

Go to https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017

And download "Build Tools For Visual Studio" under "Tools for " Visual Studio"

Thank You Hope this helps. I had this problem and solved using this method

adi07wad commented 6 years ago

@benfred - Thank you! It took me ages till your comment to get spacy installed!

JoeTorino commented 6 years ago

After I install the build-tools-for-visual-studio-2017 package is there anything else I need to do to make the compiler work with python? (I'm using anaconda)

jaidenjohn commented 6 years ago

No. All is set. You can continue

Thankyou Jaiden John Bose

On Wed, Jul 25, 2018 at 1:48 PM JoeTorino notifications@github.com wrote:

After I install the build-tools-for-visual-studio-2017 package is there anything else I need to do to make the compiler work with python? (I'm using anaconda)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/benfred/implicit/issues/76#issuecomment-407673546, or mute the thread https://github.com/notifications/unsubscribe-auth/Akjcm-XRjUuuVaKqqTDV-GnkGoHilbllks5uKCnlgaJpZM4RutL7 .

-- The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.

jaidenjohn commented 6 years ago

hi

On Tue, Aug 14, 2018 at 8:29 PM jstar-ko notifications@github.com wrote:

hello

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/benfred/implicit/issues/76#issuecomment-412902350, or mute the thread https://github.com/notifications/unsubscribe-auth/Akjcm827geG8ck7Tf8V_tPx8Wz-wHUyoks5uQuXDgaJpZM4RutL7 .

-- The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.

Mavericks334 commented 6 years ago

Hi,

I have installed Microsoft Visual C++ 2017 and get the below error. error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

I have updated setuptools as well and still does not work.

How do i avoid this?

Regards, Ren.

temannin commented 6 years ago

Here's what I did:

  1. Downloaded Microsoft Visual C++ Build Tools from this link: https://visualstudio.microsoft.com/downloads/

  2. Run the installer

  3. Select: Workloads → Visual C++ build tools.

  4. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10)

Instructions from: https://www.scivision.co/python-windows-visual-c++-14-required/

jaidenjohn commented 6 years ago

@tylerericmanning Yeah, it's correct. I used the same way.

Thank You

jaidenjohn commented 6 years ago

@Mavericks334 The link you gave is not working. Please update the link.

Thank You

temannin commented 6 years ago

@jaidenjohn https://visualstudio.microsoft.com/downloads/

There is the updated link. Scroll down to Build Tools for Visual Studio 2017

arwhyte commented 5 years ago

@tylerericmanning et al -- I encountered the "error: Microsoft Visual C++ 14.0 is required" error when attempting to run

pip install mysqlclient

in support of a Django 2.x / MySQL 8 installation.

I encountered it first when running Python 3.7.0. I installed the build tools as part of a Visual Studio 2017 install. When I could not resolve the issue, I uninstalled both Visual Studio 2017 and Python 3.7.0.

I then installed Python 3.6.6 (on the off chance that 3.7 was the problem) and installed VS build tools 2017 (build 15.8.2), Visual C++ Build Tools workload only. Rechecking the install the following optional items are checked:

Windows 10 SDK (10.0.17134.0) Visual C++ tools for CMake Testing tools core features - Build Tools

When re-running pip install mysqlclient I encounter a new error:

 Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
    Complete output from command c:\users\arwhyte\development\repos\github\arwhyte\django-tutorial-mysql\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\arwhyte\\AppData\\Local\\Temp\\pip-install-fi30oprf\\mysqlclient\\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\arwhyte\AppData\Local\Temp\pip-record-jbvsk1zo\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\arwhyte\development\repos\github\arwhyte\django-tutorial-mysql\venv\include\site\python3.6\mysqlclient:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    copying _mysql_exceptions.py -> build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\release.py -> build\lib.win-amd64-3.6\MySQLdb
    copying MySQLdb\times.py -> build\lib.win-amd64-3.6\MySQLdb
    creating build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.6\MySQLdb\constants
    running build_ext
    building '_mysql' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,13,'final',0) -D__version__=1.3.13 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.6\Release\_mysql.obj /Zl
    _mysql.c
    _mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\users\arwhyte\development\repos\github\arwhyte\django-tutorial-mysql\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\arwhyte\\AppData\\Local\\Temp\\pip-install-fi30oprf\\mysqlclient\\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\arwhyte\AppData\Local\Temp\pip-record-jbvsk1zo\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\arwhyte\development\repos\github\arwhyte\django-tutorial-mysql\venv\include\site\python3.6\mysqlclient" failed with error code 1 in C:\Users\arwhyte\AppData\Local\Temp\pip-install-fi30oprf\mysqlclient\

I'm new to Windows 10 (Mac guy) and have not found any hints on line on how to fix the missing file/directly issues:

 _mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

Any suggestions on how to resolve this would be appreciated.

WangHuiYa commented 5 years ago

我想用pip安装rasa_core出现这个错误怎么办(error:error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

arwhyte commented 5 years ago

:wink: I was able to resolve this roadblock by resorting to Christoph Gohlke's collection of Unoffical Windows Binaries for Python Extension Packages. Download the appropriate the mysqlclient the wheel (.whl) file. For Python 3.7 click on "mysqlclient‑1.3.13‑cp37‑cp37m‑win_amd64.whl" and it will download to your machine. Then perform a manual install* of the package via pip:

(venv) PS C:\Users\arwhyte\Development\repos\github\arwhyte\django-tutorial-mysql> pip install C:\Users\arwhyte\Downloads\mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl
Processing c:\users\arwhyte\downloads\mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.3.13
WangHuiYa commented 5 years ago

😉我通过使用Christoph Gohlke收集的 用于Python扩展包非官方Windows二进制文件来解决这个障碍。下载相应的mysqlclient轮(* .whl)文件。对于Python 3.7,单击“mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl”,它将下载到您的计算机。然后通过以下方式_手动安装_包pip

(venv) PS C:\Users\arwhyte\Development\repos\github\arwhyte\django-tutorial-mysql> pip install C:\Users\arwhyte\Downloads\mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl
Processing c:\users\arwhyte\downloads\mysqlclient-1.3.13-cp37-cp37m-win_amd64.whl
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.3.13

Thank you for solving the problem (参见https://github.com/conda-forge/implicit-feedstock)

Juan025427 commented 5 years ago

Is it the same error that I am facing now? Any way to fix this, net framework is pre-installed in my windows 10 and no update is required for this framework main problem is that it is not working screenshot 6

inweblife commented 5 years ago

You need to install the visual c++ build tools. The link in the error message seems like it's dead, but you can download them here: https://visualstudio.microsoft.com/visual-cpp-build-tools/

Note that while the error is calling for vc++ 14.0 - everything will work with newer versions of visual c++.

It is no work. The problem, is so serius. I have Win10 64-bit, Python 3.7 64-bit and install all this microshit winblows studio bulshit and have no work

And that it turns out!? Can't use just one language like Python. How Ruby became

vikash310 commented 5 years ago

pip install -U setuptools It will solve such problem

Mavericks334 commented 5 years ago

Thanks I fixed the issue by installing community version of visual studio

On Tue, 9 Oct 2018 at 1:23 AM, Vikash kumar notifications@github.com wrote:

pip install -U setuptools It will solve such problem

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/benfred/implicit/issues/76#issuecomment-427958947, or mute the thread https://github.com/notifications/unsubscribe-auth/AcsMItXIdh29du6lgcgPEaWKFqLC7TUkks5ui61GgaJpZM4RutL7 .

inweblife commented 5 years ago

No, no work pip install -U setuptools no work it is serios problem

vikash310 commented 5 years ago

since setuptools is upgraded from 28.8.0 to 40.4.3 . I have just resolved a major issue while installation of spacy by upgrading setuptools.

inweblife commented 5 years ago

I install latest and no work08.10.2018, 23:04, "Vikash kumar" notifications@github.com:since setuptools is upgraded from 28.8.0 to 40.4.3 . I have just resolved a major issue while installation of spacy by upgrading setuptools.

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

vikash310 commented 5 years ago

try python version 3.5.4

inweblife commented 5 years ago

[Running] scriptcs "c:\Users\ivan7\OneDrive\Работен плот\test\new.cs"'scriptcs' is not recognized as an internal or external command,operable program or batch file.08.10.2018, 23:15, "Vikash kumar" notifications@github.com:try python version 3.5.4

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

dscha09 commented 5 years ago

@temannin where to find "Workloads"?

zrss commented 5 years ago

Here's what I did:

  1. Downloaded Microsoft Visual C++ Build Tools from this link: https://visualstudio.microsoft.com/downloads/
  2. Run the installer
  3. Select: Workloads → Visual C++ build tools.
  4. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10)

Instructions from: https://www.scivision.co/python-windows-visual-c++-14-required/

... how win7 work

GavinMoreYoung commented 5 years ago

i am also see the same issue ,i can not solve it

TalentZing commented 5 years ago

Here's what I did:

  1. Downloaded Microsoft Visual C++ Build Tools from this link: https://visualstudio.microsoft.com/downloads/
  2. Run the installer
  3. Select: Workloads → Visual C++ build tools.
  4. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10)

Instructions from: https://www.scivision.co/python-windows-visual-c++-14-required/

I too did the same but only with no luck.

GavinMoreYoung commented 5 years ago

这是我做的:

  1. 从此链接下载Microsoft Visual C ++生成工具:https//visualstudio.microsoft.com/downloads/
  2. 运行安装程序
  3. 选择:工作负载→Visual C ++构建工具。
  4. 安装选项:仅选择“Windows 10 SDK”(假设计算机是Windows 10)

说明来自:https//www.scivision.co/python-windows-visual-c++-14-required/

我也做了同样但只是没有运气。

you can try pip install tf-nightly ,this package could solve you issue

TalentZing commented 5 years ago

pip install tf-nightly

Tried but did not work. Thanks.

cyrineee commented 5 years ago

it didn't work even after installing community version of vs

Walt-H commented 5 years ago

I was able to solve the problem doing the following:

  1. Set the SLUGIFY_USES_TEXT_UNIDECODE environment variable to yes

  2. Install VS Buildtools

  3. Choose the following options in the Work Loads -> Visual C++ build tools -> Optional

    Windows 10 SDK (10.0.17763.0)
    Visual C++ tools for CMake
    Testing tools core features - Build Tools
    Visual C++ ATL for x86 and x64
    VC++ 2015.3 v14.00 (v140) toolset for desktop
  4. Choose the following options in the Work Loads -> Visual C++ build tools -> Individual Components

    Windows Universal CRT SDK
    Windows 8.1 SDK
  5. Restart the computer

  6. Then as told by Iagom, we need to copy rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

  7. We then need to run pip install -U setuptools

  8. Now we can run the pip install apache-airflow command (I had to do it in an administrator shell)

evgarthub commented 5 years ago

I was able to solve the problem doing the following:

  1. Set the SLUGIFY_USES_TEXT_UNIDECODE environment variable to yes
  2. Install VS Buildtools
  3. Choose the following options in the Work Loads -> Visual C++ build tools -> Optional
Windows 10 SDK (10.0.17763.0)
Visual C++ tools for CMake
Testing tools core features - Build Tools
Visual C++ ATL for x86 and x64
VC++ 2015.3 v14.00 (v140) toolset for desktop
  1. Choose the following options in the Work Loads -> Visual C++ build tools -> Individual Components
Windows Universal CRT SDK
Windows 8.1 SDK
  1. Restart the computer
  2. Then as told by Iagom, we need to copy rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
  3. We then need to run pip install -U setuptools
  4. Now we can run the pip install apache-airflow command (I had to it in an administrator shell)

Nice! Thanks a lot! I had trouble with pyEDFlib installing, but this method has helped.

noorkhokhar99 commented 5 years ago

download from here:https://files01.tchspt.com/temp/vc_redist.x64.exe

dKustura commented 5 years ago

Since I struggled for some time with this problem, answer to the following post worked out for me: https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html

Hope it helps.

AnandSharma98 commented 5 years ago

for the error -> error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"

remember to use version of 2017 for the build tools cuz 2019 version wouldn't work. also satisfy the following terms.

upgrade your pip install upgrade your pycharm ide.

NeoAce commented 5 years ago

image How can I resolve this problem? I'm having a problem about this when im installing visual studio even i run it as administrator

WIN 7 Ultimate

fredwangsap commented 5 years ago

Install VS 2017 community versoin

( BTW: I installed VS 2019 build tools, it not work, I check the compiler mapping matrics, it said we should install VS 2017)

ashleywu commented 5 years ago

Still not working for me. rc.exe and rcdll.dll were not found in the location mentioned above

prudentprogramer commented 5 years ago

pip install -U setuptools It will solve such problem

did not worked

jonastandinco commented 5 years ago

Having same problem. My machine is new and I see that I have Visual C++ 2015 Redistributable. Not sure it's a pointing problem from pip to right location of C++ or do I really need to install the build tool. I tried installing but it's stuck at downloading always saying Downloading 0 B or 0 B. Had to cancel and restart many times to no avail.

nilslindemann commented 5 years ago

a 3 GB download for a c compiler? that would consume 2 third of my monthly internet volumina, aka 10 euros.

closes installer

Sorry for this negative feedback, but this is just bizarre.

nilslindemann commented 5 years ago

Further, not everyone uses a windows version which does not let him disable automatic updates, aka, some prefer Windows 7. There is no option for that operating system in that installer.