Unable to install gensim in python -


i have problem installing gensim module. installed numpy , scipy dependent modules getting error while installing gensim. tried solutions given in python pip install gives "command "python setup.py egg_info" failed error code 1" none of them worked.

here error:

    >pip install --target="d:\python\packages" gensim collecting gensim   using cached gensim-2.3.0-cp36-cp36m-win32.whl collecting scipy>=0.18.1 (from gensim)   using cached scipy-0.19.1.tar.gz     complete output command python setup.py egg_info:     traceback (most recent call last):       file "<string>", line 1, in <module>       file "c:\users\abcde\appdata\local\temp\pip-build-hu8lzsjz\scipy\setup.py", line 416, in <module>         setup_package()       file "c:\users\abcde\appdata\local\temp\pip-build-hu8lzsjz\scipy\setup.py", line 412, in setup_package         setup(**metadata)       file "c:\program files (x86)\python36-32\lib\distutils\core.py", line 108, in setup         _setup_distribution = dist = klass(attrs)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\dist.py", line 315, in __init__         self.fetch_build_eggs(attrs['setup_requires'])       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\dist.py", line 361, in fetch_build_eggs         replace_conflicting=true,       file "c:\program files (x86)\python36-32\lib\site-packages\pkg_resources\__init__.py", line 850, in resolve         dist = best[req.key] = env.best_match(req, ws, installer)       file "c:\program files (x86)\python36-32\lib\site-packages\pkg_resources\__init__.py", line 1122, in best_match         return self.obtain(req, installer)       file "c:\program files (x86)\python36-32\lib\site-packages\pkg_resources\__init__.py", line 1134, in obtain         return installer(requirement)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\dist.py", line 429, in fetch_build_egg         return cmd.easy_install(req)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\command\easy_install.py", line 653, in easy_install         not self.always_copy, self.local_index       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 636, in fetch_distribution         dist = find(requirement)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 617, in find         dist.download_location = self.download(dist.location, tmpdir)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 566, in download         found = self._download_url(scheme.group(1), spec, tmpdir)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 805, in _download_url         return self._attempt_download(url, filename)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 811, in _attempt_download         headers = self._download_to(url, filename)       file "c:\program files (x86)\python36-32\lib\site-packages\setuptools\package_index.py", line 726, in _download_to         block = fp.read(bs)       file "c:\program files (x86)\python36-32\lib\http\client.py", line 449, in read         n = self.readinto(b)       file "c:\program files (x86)\python36-32\lib\http\client.py", line 493, in readinto         n = self.fp.readinto(b)       file "c:\program files (x86)\python36-32\lib\socket.py", line 586, in readinto         return self._sock.recv_into(b)       file "c:\program files (x86)\python36-32\lib\ssl.py", line 1002, in recv_into         return self.read(nbytes, buffer)       file "c:\program files (x86)\python36-32\lib\ssl.py", line 865, in read         return self._sslobj.read(len, buffer)       file "c:\program files (x86)\python36-32\lib\ssl.py", line 625, in read         v = self._sslobj.read(len, buffer)     connectionreseterror: [winerror 10054] existing connection forcibly closed remote host      ---------------------------------------- command "python setup.py egg_info" failed error code 1 in c:\users\abcde\appdata\local\temp\pip-build-hu8lzsjz\scipy\ 

the error text you've supplied indicates actual problem (a) involving attempt install scipy, on gensim relies; (b) related broken https connection, indicating problem network connectivity (or blocking secure-connection).

also, it's rare need specify --target pip; if environment (reachable executables) correctly set-up, you'd able pip install gensim. (and if installing non-default location, may have issues later when active environment isn't using libraries expected.)

suggestions:

  • check able access remote secure websites, homepage of pypi repository pip using: https://pypi.python.org/pypi
  • try again later; perhaps network issues transient
  • try pip install scipy
  • consider using conda distribution tool, tends well-optimized windows installations. (i prefer miniconda variant, installs minimum set of things request.)

also, while python, gensim, , related packages can work on windows systems, note development/testing on such python/nlp/ml open-source happens on linux/osx systems. result, there installation/configuration issues on windows, , there's less prior-documented troubleshooting people who've hit same issues. if have choice, such work goes smoothest on linux/unix systems.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -