问题
I installed ggplot
for python 2.7 in a Win64 env using conda
via the command line:
$conda install -c https://conda.binstar.org/bokeh ggplot
since:
$pip install -U ggplot
could not locate the package (see pevious stackQ).
Checking if module is installed:
>python -c "import ggplot"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named ggplot
Any idea how to resolve this?
Update notes: debug tests
$pip freeze
>(finds package ggplot)
$import imp
$imp.find_module("ggplot")
>'C:\\Users\\Remi\\Anaconda2\\envs\\envx\\lib\\site-packages\\ggplot'
回答1:
I am posting the resolution I arrived to. It is not linear, although it may benefit others who may encounter a similar issue.
First step: activated the environment envx
where the ggplot
module was said to reside in.
Importing module again:
$python -c "import ggplot"
Throws a complaint ending with:
ImportError: DLL load failed: The specified module could not be found.
among failures in requesting imports from scipy
and ggplot
modules.
Second step: re-installed scipy
$conda install scipy
Here conda has to do some 'intuitive' updates of python
, numpy
... ect. During the initial ggplot
install, conda
went the downgrade route.
That's it.
来源:https://stackoverflow.com/questions/37465839/module-ggplot-installed-but-cannot-be-imported