简体   繁体   中英

Error when installing gensim using pip install

Used command pip install --upgrade gensim from https://pypi.org/project/gensim/ Anyone knows what might cause this?

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for gensim
  Running setup.py clean for gensim
Failed to build gensim
Installing collected packages: gensim
    Running setup.py install for gensim ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Andreea Elena\\AppData\\Local\\Temp\\pipinstall-khjrriwd\\gensim_18d18388d198487b8f7aebdfc3c97b94\\setup.py'"'"'; __file__='"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-khjrriwd\\gensim_18d18388d198487b8f7aebdfc3c97b94\\stup.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\AppData\Local\Temp\pip-record-c7348b68\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\appdata\local\programs\python\python39\Iclude\gensim'```

It was a version problem, python 3.9 won't work with gensim. Installed 3.8 and works now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM