Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install #148

Closed
1202010685 opened this issue Apr 24, 2024 · 2 comments
Closed

pip install #148

1202010685 opened this issue Apr 24, 2024 · 2 comments

Comments

@1202010685
Copy link

1202010685 commented Apr 24, 2024

  • Contextualized Topic Models version: ---
  • Python version: 3,11
  • Operating System: windows 10

Description

Hi,

When I tried to use pip install -U contextualized-topic-models in Anaconda prompt and the new set environment ctm, I got error:

Building wheels for collected packages: gensim
  Building wheel for gensim (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [737 lines of output]
      C:\Users\fphugu\AppData\Local\anaconda3\envs\ctm\Lib\site-packages\setuptools\__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

#''......(too many rows)''

gensim/models/word2vec_inner.c(12424): error C2037: left of 'f_lineno' specifies undefined struct/union '_frame'
     error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
     [end of output]

 note: This error originates from a subprocess, and is likely not a problem with pip.
 ERROR: Failed building wheel for gensim
 Running setup.py clean for gensim
Failed to build gensim
ERROR: Could not build wheels for gensim, which is required to install pyproject.toml-based projects

How to fix it? I also tried the installing on another Windows machine, it failed also. I tried it on Linux, it could import successfully, but I am more familiar with Windows.

@j-at-ch
Copy link

j-at-ch commented Apr 26, 2024

Hi @1202010685 - first thing I'd try is to use a different version of Python. Try creating a new venv with Python 3.8 instead.

The error you're hitting is for building the specified version of gensim 4.2.0 using a particular compiler on Windows. It's an upstream dependency of this package that might not sit well with the Windows Python 3.11 C compiler.

@1202010685
Copy link
Author

Hi @1202010685 - first thing I'd try is to use a different version of Python. Try creating a new venv with Python 3.8 instead.

The error you're hitting is for building the specified version of gensim 4.2.0 using a particular compiler on Windows. It's an upstream dependency of this package that might not sit well with the Windows Python 3.11 C compiler.

Hi, I appreciate your magical response. It worked!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants