[Tutor] Can not install pomegranate

Mats Wichmann mats at wichmann.us
Wed Aug 26 13:31:13 EDT 2020


On 8/26/20 4:26 AM, Ulfat Hajiyev wrote:
> Dears,
> 
> 1st and foremost would like to say that I experience every time a lot of
> problems when downloading packages with pip. It consumes a lot of time and
> energy.
> 
> To the point - can not install pomegranate  to use it for probability.
> 
> I use Windows 10, python 3.8.5, pip 20.2.2. Error is shown below email.
> 
> Please advise:
> 1. How should I continue downloading pomegranate through pip properly, *or*
> maybe
> 2. What are alternatives(to pip) to downloading pomegranate, *and* also
> 3. What are other libraries for python where I can use full potential of
> probability.

A couple of notes:
0. Usually, the best place to get support for issues with a package is
from the person or organization that produces the package.

1. you don't show how you ran the command; normally you should use your
Python to install via pip, not the /command/ named pip.  That is, if you
successfully launch Python by using the Python Launcher, use it to
launch pip:

py -m pip install somepackage

2.  If you look up the package you're trying to install on pypi, you can
usually learn something.  If nothing else, where it comes from (see #0),
but also what's available to download. This link suggests that you
should probably be able to install this successfully as there's a
Windows version for Python 3.8

https://pypi.org/project/pomegranate/#files

3. If pip fails to find and install a matching wheel (.whl), it will
fall back to picking the source package and try to build it.  If there
are bits of that which require a compiler, that's normally a bad look on
Windows, which doesn't come with a setup compilation environment (even
if you have a compiler, they're almost never set up the way the package
expects). That seems to be where you are:


> *ERROR shown below*
> *----------------------------------------------------*
> 
> *.................*
> *.................*
> *.................*
> *.................*
>    c1: fatal error C1083: Cannot open source file:
> 'pomegranate/distributions/NeuralNetworkWrapper.c': No such file or
> directory
>   error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
> 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
>   ----------------------------------------
>   ERROR: Failed building wheel for pomegranate
So you need to figure out why it's not picking the wheel for Win/3.8 and
is instead attempting to compile from source.  The only thing I can spot
from here is that through 3.7 there were two Windows wheels, one for
32-bit, one for 64-bit.  For 3.8 the provider seems to have only
uploaded a 64-bit (amd64) one. Are you by chance running 32-bit WIndows
and/or Python?


More information about the Tutor mailing list