Comments (34)
How to install glove-python in windows
-
goto cloned directory location and open setup.py and remove 'stdc++' from libraries=[] paramerter after removing it will look like below
Extension("glove.corpus_cython", [glove_corpus],
language='C++',
libraries=[],
extra_link_args=compile_args,
extra_compile_args=compile_args)] -
conda install cython
-
open cmd from that location where setup.py is stored and run below command
python setup.py install
from glove-python.
I removed stdc++ from setup.py and it compiled and worked
Extension("glove.corpus_cython", [glove_corpus],
language='C++',
libraries=[],
extra_link_args=compile_args,
extra_compile_args=compile_args)]
from glove-python.
I am able to install the Glove by following comment of @huan086
Now, I am getting an ImportError
from glove import Glove
importerror: No module named corpus_cython
Any idea how to fix it?
from glove-python.
Can you try to find out which file it thinks it's missing?
from glove-python.
Sorry, I am not sure where to look for something like that, I am fairly new
to Python, let alone to cython extensions. Seems like it happens shortly
after the line
building 'glove.glove_cython' extension
is printed, but i could not find anything similar to this line using grep.
On Sun, Jan 31, 2016 at 12:53 PM, maciejkula [email protected]
wrote:
Can you try to find out which file it think it's missing?
—
Reply to this email directly or view it on GitHub
#42 (comment)
.
from glove-python.
OK. I'll try to reproduce when I get a bit of time.
from glove-python.
Thanks so much! Will wait for your results.
On Mon, Feb 1, 2016 at 2:44 PM, maciejkula [email protected] wrote:
OK. I'll try to reproduce when I get a bit of time.
—
Reply to this email directly or view it on GitHub
#42 (comment)
.
from glove-python.
Is there a conda install for this ? I do have visual Studio 2015 with C++ installed. Here is the error I get
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
LINK : warning LNK4044: unrecognized option '/ffast-math'; ignored
LINK : fatal error LNK1181: cannot open input file 'stdc++.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe' failed with exit status 1181
for python 3.5
from glove-python.
@LopezGG: I have the same issue. Have you found out how to fix it? Thank you very much.
from glove-python.
Nope. I did not figure it out. I used glove code compiled by a colleague. I suspect it has something to do with spaces in the path on windows OS
from glove-python.
@LopezGG : thank you. I also decided to use GloVe on Ubuntu instead.
from glove-python.
That's the direction I have taken as well
On Thu, Apr 28, 2016 at 5:44 AM, Suinga [email protected] wrote:
@LopezGG https://github.com/LopezGG : thank you. I also decided to use
GloVe on Ubuntu instead.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#42 (comment)
from glove-python.
same issue. is there any new solution for this?
from glove-python.
I removed stdc++ from setup.py and it compiled and worked
Extension("glove.corpus_cython", [glove_corpus], language='C++', libraries=[], extra_link_args=compile_args, extra_compile_args=compile_args)]
Hi huam086,
After you remove 'stdc++' and is installed it, the package works fine ?
from glove-python.
Have you installed cython package. It is a prerequisite for installing glove-python.
from glove-python.
Have you installed cython package. It is a prerequisite for installing glove-python.
Hi Subinsm,
I'm using Anaconda, so yes I have Cython.
from glove-python.
Hi Subinsm,
I'm using Anaconda, so yes I have Cython.
Anaconda does not have cython pre-installed. You will have to install cython manually.
In a terminal try,
conda install cython
Have numpy to the latest version to avoid warning messages
from glove-python.
Thanks @huan086, It worked for me.
from glove-python.
thank you for the tutorial
How can I go to the clone directory(can you give the path)? to change setup.py configuration
from glove-python.
@huan086 @prabhakar9885 @rahul4tripathi2 @JabeurSoufian
Deleting the dependency may allow you to compile and install the package but it won't work as expected. The dependency is there for a reason.
After many hours of tinkering I've managed to install this package on Windows and the tests pass for me. I documented my findings in this wiki page:
https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows
from glove-python.
Thanks a lot. It worked
@huan086 @prabhakar9885 @rahul4tripathi2 @JabeurSoufian
Deleting the dependency may allow you to compile and install the package but it won't work as expected. The dependency is there for a reason.
After many hours of tinkering I've managed to install this package on Windows and the tests pass for me. I documented my findings in this wiki page:
https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows
from glove-python.
I am having the same problems and when I try conda install cython
I get this message
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(507): An error occurred while installing package 'defaults::pyqt-4.10.4-py27_1'.
IOError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: done
IOError(13, 'Permission denied')
And when I try to run setup install i get this too
Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
from glove-python.
@AHAMES do you have sufficient permissions to install new conda packages? Do you have other python programs running (including Jupyter Notebooks) that could prevent an old version of the pyqt library being replaced?
from glove-python.
@IronFarm Spyder was running and after I closed it it installed, but I am still getting
Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
When running Setup install
from glove-python.
@AHAMES That's to be expected. Installing the package requires some C
code to be compiled. One way of achieving this on Windows is to install Microsoft Visual C++ so I'd suggest installing the stated package.
I had most luck using an alternate compiler and python 3.6. I wrote up my installation procedure here:
https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows
from glove-python.
@IronFarm I followed your guide, but it still doesn't install, pytest is not recognized.
And I am getting this error while trying to import Glove.
Does you method work for python2.7 ?
>>> from glove import Glove
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "glove\__init__.py", line 1, in <module>
from .corpus import Corpus
File "glove\corpus.py", line 10, in <module>
from .corpus_cython import construct_cooccurrence_matrix
ImportError: No module named corpus_cython
from glove-python.
@AHAMES well it's not too surprising that you can't import it if it didn't install. What is the installation error?
I haven't tried python 2.7 but it might work. I'd strongly recommend upgrading in the near future though as python 2 support has already been dropped by many major packages e.g. scipy & numpy.
from glove-python.
I re-tracked my steps and found this when running pip install .
C:\Users\X\Documents\NetBeansProjects\MedHelpCrawler_1\glove-python>pip install .
Processing c:\users\ahmed\documents\netbeansprojects\medhelpcrawler_1\glove-python
Requirement already satisfied: numpy in c:\python27\lib\site-packages (from glove-python==0.1.0) (1.14.3)
Requirement already satisfied: scipy in c:\python27\lib\site-packages (from glove-python==0.1.0) (1.1.0)
Installing collected packages: glove-python
Found existing installation: glove-python 0.1.0
Uninstalling glove-python-0.1.0:
Successfully uninstalled glove-python-0.1.0
Running setup.py install for glove-python ... done
Successfully installed glove-python-0.1.0
c:\python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:369: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping
from glove-python.
@AHAMES It suggests it successfully installed Glove before the error (the error suggests upgrading python FWIW).
Did you by any chance follow the steps in this comment? They allow the package to install but they completely break the package's functionality:
#42 (comment)
from glove-python.
@IronFarm
I did actually follow them at first, you think it will work if i reverse it? Will try it.
from glove-python.
@AHAMES You may have problems with the compilation and installation but when it installs it will actually work.
from glove-python.
@IronFarm
(I restarted from the beginning and got a python 3.6 virtual env, but for some reason it still runs on 2.7 when using pytest and it doesn't import when running python)
scratch that, it does import in python 3.6 when running python itself.
Thank you for your effort with me and thank you for your patience.
(glove) C:\Users\Ahmed\Documents\NetBeansProjects\glove-python>pytest
============================= test session starts =============================
platform win32 -- Python 2.7.15, pytest-3.8.0, py-1.6.0, pluggy-0.7.1
rootdir: C:\Users\Ahmed\Documents\NetBeansProjects\glove-python, inifile:
collected 0 items / 2 errors
=================================== ERRORS ====================================
____________________ ERROR collecting tests/test_corpus.py ____________________
ImportError while importing test module 'C:\Users\Ahmed\Documents\NetBeansProjects\glove-python\tests\test_corpus.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..\..\..\Anaconda2\lib\site-packages\six.py:709: in exec_
exec("""exec _code_ in _globs_, _locs_""")
tests\test_corpus.py:9: in <module>
from glove import Corpus
E ImportError: No module named glove
____________________ ERROR collecting tests/test_glove.py _____________________
ImportError while importing test module 'C:\Users\Ahmed\Documents\NetBeansProjects\glove-python\tests\test_glove.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..\..\..\Anaconda2\lib\site-packages\six.py:709: in exec_
exec("""exec _code_ in _globs_, _locs_""")
tests\test_glove.py:4: in <module>
from glove import Corpus, Glove
E ImportError: No module named glove
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!
=========================== 2 error in 0.41 seconds ===========================
from glove-python.
So is it working now? You probably need to install pytest in your python 3 virtual env for the tests to work. However, if the module is behaving as expected there is no need to run the tests.
from glove-python.
I removed stdc++ from setup.py and it compiled and worked
Extension("glove.corpus_cython", [glove_corpus], language='C++', libraries=[], extra_link_args=compile_args, extra_compile_args=compile_args)]
You are my God! I spent a whole afternoon!
from glove-python.
Related Issues (20)
- install glove-python on linux HOT 3
- Glove on multipe documents
- Does Glove have this function ?
- Compile error in Linux Anaconda installation HOT 7
- Unable to install glove_python in virtual environment HOT 1
- Failed installing Glove_python on linux HOT 5
- Fail to use it in Google Colab HOT 3
- Bug in binary search
- unable install on win10 HOT 13
- import error on OSX
- Failed installing on win10 use “pip install glove-python-binary” HOT 1
- Installation in Google Colab HOT 3
- AttributeError: module 'glove.metrics' has no attribute 'read_analogy_file'
- Missing import in example analogy_tasks_evaluation.py
- How to fine-tune the pretrained GloVe vectors on a custom corpus using this library HOT 1
- installation failed on Windows 10 HOT 2
- Can't install glove_python HOT 8
- Can't install using "pip -v install glove_python" or "python .\setup.py install" on Windows 10 HOT 2
- Can‘t’
- Can't run the glove package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glove-python.