question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyod fails to install using pip

See original GitHub issue

When attempting to install without nose, I receive the following error:

(PyVi) Michael:PyVi michael$ pip install pyod
Collecting pyod==0.5.0 (from -r requirements.txt (line 18))
  Using cached https://files.pythonhosted.org/packages/c9/8c/6774fa2e7ae6fe9c2c648114d15ba584f950002377480e14183a0999af30/pyod-0.5.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/setup.py", line 2, in <module>
        from pyod import __version__
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/__init__.py", line 4, in <module>
        from . import models
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/models/__init__.py", line 2, in <module>
        from .abod import ABOD
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/models/abod.py", line 17, in <module>
        from .base import BaseDetector
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/models/base.py", line 27, in <module>
        from ..utils.utility import precision_n_scores
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/utils/__init__.py", line 2, in <module>
        from .utility import check_parameter
      File "/private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/pyod/utils/utility.py", line 18, in <module>
        from sklearn.utils.testing import assert_equal
      File "/Users/michael/anaconda3/envs/PyVi/lib/python3.6/site-packages/sklearn/utils/testing.py", line 49, in <module>
        from nose.tools import raises
    ModuleNotFoundError: No module named 'nose'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/j4/_68f6f3j4d51_2smq2mh5hyh0000gn/T/pip-install-gjdzzane/pyod/

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
Trolexumcommented, Apr 2, 2021

@LLh-lihan, @Lotus-Lian: What is the name of your python file? If it is ‘pyod.py’, rename it. In this case you are importing your own script.

1reaction
yzhao062commented, Jun 13, 2018

The issue you saw is specific to the virtual env Qt problem on mac, which is caused by matplotlib, and it is a lingering issue. The problem can be reproduced by: import matplotlib.pyplot as plt It throws error if you install the matplotlib with pip command in a mac conda virtual env… There are several fixes though.

Using workaround 1, I managed to install pyod in mac virtual env and also succeeded in running examples. See the screenshot below:

snip20180612_1

To facilitate the installation, I also removed the use of matplotlib in the code (I do not remove it from dependency since example codes still need it) and publish a new version 0.5.2. You may want to give it a shot…

Let me know if the problem persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation - pyod 1.0.7 documentation
It is recommended to use pip or conda for installation. Please make sure the ... However, PyOD does NOT install these deep learning...
Read more >
pyod · PyPI
It is recommended to use pip or conda for installation. ... However, PyOD does NOT install these deep learning libraries for you.
Read more >
How to install pyod Python library (2022) | Amit Thinks
In this video, learn how to install the pyod Python library. Pyod is a comprehensive and scalable Python Library for Outlier Detection.
Read more >
llvmlite failed to install. Error building llvmlite - Stack Overflow
So all steps for installing on Win Python 3.9 64-bit are: pip install llvmlite‑0.35.0‑cp39‑cp39‑win_amd64.whl (.whl file from here). pip ...
Read more >
How to install modules with PIP (and fix it when it fails) - Medium
How to use PIP. Installing modules to python is painfully easy. Simply open up your terminal: Windows — Command Prompt (CMD); MacOS —...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found