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.

pip install scikit-learn fails in my virtualenv

See original GitHub issue

When I’m installing the package following shows up:

Command "<my-directory>/dev_env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ya0bvm5k/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9skvu63c-record/install-record.txt --single-version-externally-managed --compile --install-headers <my-directory>/dev_env/include/site/python3.6/scikit-learn --home=/tmp/tmpw1u1nxgr" failed with error code 1 in /tmp/pip-build-ya0bvm5k/scikit-learn/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
glemaitrecommented, Jun 23, 2017

@root-sudip This is not related to openblas or lapack. You should install python-dev or python-devel depending of your distribution.

The important message in the traceback is:

sklearn/__check_build/_check_build.c:15:20: fatal error: Python.h: No such file or directory
#include "Python.h"
                  ^
compilation terminated.
1reaction
jnothmancommented, Jul 5, 2018

Why are you using 3.6-dev?? Perhaps you mean Python 3.7, which we don’t yet support. We’re likely to release version 0.19.2 with Python 3.7 support in the next couple of days.​

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install sklearn in virtual environment on windows ...
Your error says all". follow steps. pip install numpy. and later pip install scikit-learn. as numpy is the requirement.
Read more >
Installing scikit-learn
Install the version of scikit-learn provided by your operating system or Python distribution. This is a quick option for those who have operating...
Read more >
How to resolve the error when installing scikit-learn in Linux
I'm trying to upgrade my numpy version but the command with pip3 won't worked (it show the same error as above) . Can...
Read more >
Fix ModuleNotFoundError: No module named 'sklearn'
People new to Python usually have troubles installing scikit-learn package, which is the de-facto Machine Learning library. A very common error when it ......
Read more >
Can't use installed (using virtual env) scikit-learn in web app
mkvirtualenv my-virtualenv --python=python3.7 (my-virtualenv) $ pip install scikit-learn. I also created a web app on PythonAnywhere, ...
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