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

local gensim source code returns the version of global installation #1138

Closed
ymnliu opened this issue Feb 8, 2017 · 1 comment
Closed

local gensim source code returns the version of global installation #1138

ymnliu opened this issue Feb 8, 2017 · 1 comment
Assignees
Labels
documentation Current issue related to documentation

Comments

@ymnliu
Copy link

ymnliu commented Feb 8, 2017

While using gensim.__version__ to check on the version, the current code returns the global version number. This is caused by Line 10 in gensim.__init__.py:
__version__ = __import__('pkg_resources').get_distribution('gensim').version .

In my situation, I have a newer version (0.13.0) installed in my system paths and I try to use an older version (0.10.3) of gensim in a project. I put the source code of the older version in the working directory of the project, so when I do import gensim, only the older version of gensim is imported.

However, though the local (older) gensim is imported, gensim.__version__ will still return the global version number, which is not correct in local configurations. Can the version number be hard-coded like what scikit-learn does here?

@piskvorky piskvorky added the documentation Current issue related to documentation label Mar 4, 2017
@tmylk tmylk closed this as completed in 51bb15b Mar 5, 2017
@tmylk
Copy link
Contributor

tmylk commented Mar 5, 2017

Thanks for reporting this.

pranaydeeps pushed a commit to pranaydeeps/gensim that referenced this issue Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Current issue related to documentation
Projects
None yet
Development

No branches or pull requests

3 participants