Skater icon indicating copy to clipboard operation
Skater copied to clipboard

error from 'pip install'

Open pucktada opened this issue 6 years ago • 4 comments

when i tried to install "Skater" on my macbook with pip i got this error, anyone have ideas how to fix this? thanks.. (my environment is python 3.7.4)

Building wheels for collected packages: skater, wordcloud Building wheel for skater (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2l/fxyjs90s0ws268s0hp0n8kgh0000gn/T/pip-install-v491ahqh/skater/setup.py'"'"'; file='"'"'/private/var/folders/2l/fxyjs90s0ws268s0hp0n8kgh0000gn/T/pip-install-v491ahqh/skater/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2l/fxyjs90s0ws268s0hp0n8kgh0000gn/T/pip-wheel-ykqd_dbw --python-tag cp37 cwd: /private/var/folders/2l/fxyjs90s0ws268s0hp0n8kgh0000gn/T/pip-install-v491ahqh/skater/ Complete output (127 lines): running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/skater copying skater/init.py -> build/lib/skater copying skater/about.py -> build/lib/skater creating build/lib/skater/core copying skater/core/model_interpreter.py -> build/lib/skater/core copying skater/core/explanations.py -> build/lib/skater/core copying skater/core/init.py -> build/lib/skater/core copying skater/core/validation.py -> build/lib/skater/core creating build/lib/skater/util copying skater/util/static_types.py -> build/lib/skater/util copying skater/util/plotting.py -> build/lib/skater/util copying skater/util/init.py -> build/lib/skater/util copying skater/util/logger.py -> build/lib/skater/util copying skater/util/progressbar.py -> build/lib/skater/util copying skater/util/kernels.py -> build/lib/skater/util copying skater/util/exceptions.py -> build/lib/skater/util copying skater/util/text_ops.py -> build/lib/skater/util copying skater/util/image_ops.py -> build/lib/skater/util copying skater/util/dataops.py -> build/lib/skater/util copying skater/util/serialization.py -> build/lib/skater/util copying skater/util/user_defined_types.py -> build/lib/skater/util creating build/lib/skater/tests copying skater/tests/test_model.py -> build/lib/skater/tests copying skater/tests/test_validation.py -> build/lib/skater/tests copying skater/tests/test_partial_dependence.py -> build/lib/skater/tests copying skater/tests/test_dnni.py -> build/lib/skater/tests copying skater/tests/test_feature_importance.py -> build/lib/skater/tests copying skater/tests/init.py -> build/lib/skater/tests copying skater/tests/test_rule_list.py -> build/lib/skater/tests copying skater/tests/test_lime.py -> build/lib/skater/tests copying skater/tests/test_image_ops.py -> build/lib/skater/tests copying skater/tests/test_scorer.py -> build/lib/skater/tests copying skater/tests/arg_parser.py -> build/lib/skater/tests copying skater/tests/all_tests.py -> build/lib/skater/tests copying skater/tests/test_data.py -> build/lib/skater/tests copying skater/tests/test_tree_surrogates.py -> build/lib/skater/tests copying skater/tests/test_text_ops.py -> build/lib/skater/tests creating build/lib/skater/model copying skater/model/init.py -> build/lib/skater/model copying skater/model/deployed_model.py -> build/lib/skater/model copying skater/model/base.py -> build/lib/skater/model copying skater/model/local_model.py -> build/lib/skater/model copying skater/model/scorer.py -> build/lib/skater/model creating build/lib/skater/data copying skater/data/init.py -> build/lib/skater/data copying skater/data/datamanager.py -> build/lib/skater/data creating build/lib/skater/core/local_interpretation copying skater/core/local_interpretation/text_interpreter.py -> build/lib/skater/core/local_interpretation copying skater/core/local_interpretation/init.py -> build/lib/skater/core/local_interpretation creating build/lib/skater/core/global_interpretation copying skater/core/global_interpretation/tree_surrogate.py -> build/lib/skater/core/global_interpretation copying skater/core/global_interpretation/init.py -> build/lib/skater/core/global_interpretation copying skater/core/global_interpretation/feature_importance.py -> build/lib/skater/core/global_interpretation copying skater/core/global_interpretation/base.py -> build/lib/skater/core/global_interpretation copying skater/core/global_interpretation/partial_dependence.py -> build/lib/skater/core/global_interpretation creating build/lib/skater/core/visualizer copying skater/core/visualizer/image_relevance_visualizer.py -> build/lib/skater/core/visualizer copying skater/core/visualizer/init.py -> build/lib/skater/core/visualizer copying skater/core/visualizer/tree_visualizer.py -> build/lib/skater/core/visualizer copying skater/core/visualizer/text_relevance_visualizer.py -> build/lib/skater/core/visualizer creating build/lib/skater/core/local_interpretation/lime copying skater/core/local_interpretation/lime/init.py -> build/lib/skater/core/local_interpretation/lime copying skater/core/local_interpretation/lime/lime_tabular.py -> build/lib/skater/core/local_interpretation/lime copying skater/core/local_interpretation/lime/lime_image.py -> build/lib/skater/core/local_interpretation/lime copying skater/core/local_interpretation/lime/lime_text.py -> build/lib/skater/core/local_interpretation/lime creating build/lib/skater/core/local_interpretation/dnni copying skater/core/local_interpretation/dnni/gradient_relevance_scorer.py -> build/lib/skater/core/local_interpretation/dnni copying skater/core/local_interpretation/dnni/init.py -> build/lib/skater/core/local_interpretation/dnni copying skater/core/local_interpretation/dnni/perturbation_relevance_scorer.py -> build/lib/skater/core/local_interpretation/dnni copying skater/core/local_interpretation/dnni/deep_interpreter.py -> build/lib/skater/core/local_interpretation/dnni copying skater/core/local_interpretation/dnni/initializer.py -> build/lib/skater/core/local_interpretation/dnni creating build/lib/skater/core/global_interpretation/interpretable_models copying skater/core/global_interpretation/interpretable_models/init.py -> build/lib/skater/core/global_interpretation/interpretable_models copying skater/core/global_interpretation/interpretable_models/bigdatabrlc.py -> build/lib/skater/core/global_interpretation/interpretable_models copying skater/core/global_interpretation/interpretable_models/brlc.py -> build/lib/skater/core/global_interpretation/interpretable_models creating build/lib/skater/tests/util copying skater/tests/util/init.py -> build/lib/skater/tests/util copying skater/tests/util/build_example.py -> build/lib/skater/tests/util running egg_info writing skater.egg-info/PKG-INFO writing dependency_links to skater.egg-info/dependency_links.txt writing requirements to skater.egg-info/requires.txt writing top-level names to skater.egg-info/top_level.txt reading manifest file 'skater.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'skater.egg-info/SOURCES.txt' creating build/lib/skater/util/model_specific copying skater/util/model_specific/imagenet_label.json -> build/lib/skater/util/model_specific installing to build/bdist.macosx-10.14-x86_64/wheel running install Checking .pth file support in build/bdist.macosx-10.14-x86_64/wheel/ /usr/local/opt/python/bin/python3.7 -E -c pass TEST FAILED: build/bdist.macosx-10.14-x86_64/wheel/ does NOT support .pth files error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

  build/bdist.macosx-10.14-x86_64/wheel/

and your PYTHONPATH environment variable currently contains:

  ''

Here are some of your options for correcting the problem:

  • You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files

  • You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.)

  • You can set up the installation directory to support ".pth" files by using one of the approaches described here:

    https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.

ERROR: Failed building wheel for skater

pucktada avatar Sep 23 '19 08:09 pucktada

I get the same error. Can't install it on macbook

adimyth avatar Sep 28 '19 15:09 adimyth

Hey @pucktada using conda for installation worked for me. Try this out -

# !echo <password> | sudo -S conda install --yes -c conda-forge skater

adimyth avatar Sep 28 '19 17:09 adimyth

Hey @pucktada using conda for installation worked for me. Try this out -

# !echo <password> | sudo -S conda install --yes -c conda-forge skater

thanks adimyth... :) that works for me..

pucktada avatar Oct 08 '19 04:10 pucktada

I had the same problem, I resolved it like this:


#Creating a conda env
conda create -n skater-test python=3.6

#on mac, zsh wasn't doing the trick so I used bash, maybe you don't need this one
exec bash

# activate the env
source activate skater-test

# install dependencies and the library
pip3 install --upgrade tensorflow
sudo pip install keras
sudo pip install -U skater==1.1.2
pip install tzlocal

Naviden avatar Jan 23 '20 13:01 Naviden