This used to work for me, but since two days now i am getting this issue:
pip install sklearn-contrib-py-earth
Collecting sklearn-contrib-py-earth
Using cached https://files.pythonhosted.org/packages/f8/c4/53a24835bafac880036446cc13839471a025b41de1436543f30d15d846c1/sklearn-contrib-py-earth-0.1.0.tar.gz
Requirement already satisfied: scipy>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.4.1)
Requirement already satisfied: scikit-learn>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (0.22.2.post1)
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.15.0)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.7/dist-packages (from scipy>=0.16->sklearn-contrib-py-earth) (1.19.5)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.16->sklearn-contrib-py-earth) (1.0.1)
Building wheels for collected packages: sklearn-contrib-py-earth
Building wheel for sklearn-contrib-py-earth (setup.py) ... error
ERROR: Failed building wheel for sklearn-contrib-py-earth
Running setup.py clean for sklearn-contrib-py-earth
Failed to build sklearn-contrib-py-earth
Installing collected packages: sklearn-contrib-py-earth
Running setup.py install for sklearn-contrib-py-earth ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/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-record-j66r3m9x/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
This worked for me:
pip install git+https://github.com/scikit-learn-contrib/py-earth#v0.2dev
Try this:
git clone git://github.com/scikit-learn-contrib/py-earth.git
cd py-earth
python setup.py install --cythonize
Related
I am trying to install docopt module in a virtual env, which is failing, but able to install urllib3 module.
I am creating virtual env as a unprivileged user
$ python3 -m venv yogi-venv
$ source yogi-venv/bin/activate
$ pip3 install urllib3
Collecting urllib3
Using cached https://files.pythonhosted.org/packages/5f/64/43575537846896abac0b15c3e5ac678d787a4021e906703f1766bfb8ea11/urllib3-1.26.6-py2.py3-none-any.whl
Installing collected packages: urllib3
Successfully installed urllib3-1.26.6
You are using pip version 10.0.1, however version 21.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ pip3 install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/8a/d7/f505e91e2cdea53cfcf51f4ac478a8cd64fb0bc1042629cedde20d9a6a9b/pip-21.2.2-py3-none-any.whl (1.6MB)
100% |████████████████████████████████| 1.6MB 15.2MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Successfully installed pip-21.2.2
$ pip3 list
Package Version
---------- -------
pip 21.2.2
setuptools 39.0.1
urllib3 1.26.6
$ pip3 install docopt
Collecting docopt
Using cached docopt-0.6.2.tar.gz (25 kB)
ERROR: Command errored out with exit status 1:
command: /home/servicejenkins_build/yogi-venv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r1pocera/docopt_bf20fbd042814635ba33a7f102d490d3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-r1pocera/docopt_bf20fbd042814635ba33a7f102d490d3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lk__1tg2
cwd: /tmp/pip-install-r1pocera/docopt_bf20fbd042814635ba33a7f102d490d3/
Complete output (7 lines):
running egg_info
creating /tmp/pip-pip-egg-info-lk__1tg2/docopt.egg-info
writing /tmp/pip-pip-egg-info-lk__1tg2/docopt.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-lk__1tg2/docopt.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-lk__1tg2/docopt.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-lk__1tg2/docopt.egg-info/SOURCES.txt'
error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.0.final.0.pickle'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz#sha256=49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491 (from https://pypi.org/simple/docopt/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached docopt-0.6.1.tar.gz (25 kB)
Any ideas where I am wrong?
I am trying to install fitsne in colab. Recommended way for installation is:
conda config --add channels conda-forge #if not already in your channels. Needed for fftw.
conda install cython numpy fftw
pip install fitsne
Yet, I get following error:
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from fitsne) (1.19.5)
Requirement already satisfied: cython in /usr/local/lib/python3.7/dist-packages (from fitsne) (0.29.22)
Building wheels for collected packages: fitsne
Building wheel for fitsne (setup.py) ... error
ERROR: Failed building wheel for fitsne
Running setup.py clean for fitsne
Failed to build fitsne
Installing collected packages: fitsne
Running setup.py install for fitsne ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezkx1s2e/fitsne/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezkx1s2e/fitsne/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-record-uzkyz06_/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Can someone please explain how to fix such an error in colab?
I solved it using this gist
!git clone https://github.com/KlugerLab/FIt-SNE.git
!wget http://www.fftw.org/fftw-3.3.8.tar.gz
!tar -xf fftw-3.3.8.tar.gz
!cd fftw-3.3.8
!./fftw-3.3.8/configure
!make
!make install
!g++ -std=c++11 -O3 FIt-SNE/src/sptree.cpp FIt-SNE/src/tsne.cpp FIt-SNE/src/nbodyfft.cpp -o FIt-SNE/bin/fast_tsne -pthread -lfftw3 -lm -Wno-address-of-packed-member
import sys; sys.path.append('FIt-SNE/')
from fast_tsne import fast_tsne
I tried pip install openbabel --log log_file and I got the following error:
Collecting openbabel
Using cached openbabel-2.4.1.tar.gz (74 kB)
Building wheels for collected packages: openbabel
Building wheel for openbabel (setup.py) ... error
ERROR: Failed building wheel for openbabel
Running setup.py clean for openbabel
Failed to build openbabel
Installing collected packages: openbabel
Running setup.py install for openbabel ... error
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"'; __file__='"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-record-i_0qytcj/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/openbabel Check the logs for full command output.
Here pip is an alias for pip3.
The log file is here (I am not sure if you can read it, this is my first time sharing a file)
note: A few days ago I opened a second user on my computer, I don't know how it affects things but maybe that's the reason.
I am using Mac OS Catalina.
From a quick look at the log file it looks like it wont install as it cant find a version for Mac OS, only for Windows, however the following may be useful as a workaround to that: How to Install openbabel for Python 3.6 on macOS Sierra 10.12.3
So I found a much simpler way than building openbabel manually. brew install openbabel works for openbabel3
Check the link: http://openbabel.org/wiki/Category:Installation
How to solve the below mentioned cmake error while installing the face_recognition library?
Collecting face_recognition
Using cached face_recognition-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: face-recognition-models>=0.3.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: Pillow in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: Click>=6.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: scipy>=0.17.0 in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Collecting dlib>=19.7 (from face_recognition)
Using cached dlib-19.10.0.tar.gz
Requirement already satisfied: numpy in ./anaconda/lib/python3.6/site-packages (from face_recognition)
Requirement already satisfied: olefile in ./anaconda/lib/python3.6/site-packages (from Pillow->face_recognition)
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command /Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/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 /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/tmpw6lzrrukpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Invoking CMake setup: 'cmake /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/muralidharan/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
error: [Errno 2] No such file or directory: 'cmake'
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
Complete output from command /Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-qhc3clwr-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Invoking CMake setup: 'cmake /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/muralidharan/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
error: [Errno 2] No such file or directory: 'cmake'
----------------------------------------
Command "/Users/muralidharan/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-qhc3clwr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/xz/rcv9f_6x41gcvhrqzsd6mrxw0000gn/T/pip-build-5zqyoigf/dlib/
As to me, I install face_recognition in ubuntu16 python2.7, I write a shell to install it.
#!/bin/bash
# This shell script install face_recognition in ubuntu16 python2.7
apt-get -y install git
apt-get -y install cmake
# install dlib without cuda
git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build; cd build; cmake .. ; cmake --build .
# install dlib python interface
cd -
apt-get -y install python-setuptools
apt-get -y install python-dev
python setup.py install
# install face_recognition
apt-get -y install python-pip
pip install face_recognition
error: [Errno 2] No such file or directory: 'cmake'
I ran into the same problem recently, I resolved it downloading CMAKE.
Here is the link to download it for each OS
I am currently trying to install my own package using the command: pip3 install --user ., which invokes this setup script. However, when I do that, I get the following output:
cherrybomb#cherrybomb:~/cherrybomb$ pip3 install --user .
Processing /home/cherrybomb/cherrybomb
Collecting twisted>=17.9.0 (from cherrybomb==0.1.0)
Collecting pyopenssl>=17.5.0 (from cherrybomb==0.1.0)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting wheel>=0.30.0 (from cherrybomb==0.1.0)
Using cached wheel-0.30.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached hyperlink-17.3.1-py2.py3-none-any.whl
Collecting constantly>=15.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached constantly-15.1.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached Automat-0.6.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached incremental-17.5.0-py2.py3-none-any.whl
Collecting zope.interface>=4.0.2 (from twisted>=17.9.0->cherrybomb==0.1.0)
Using cached zope.interface-4.4.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting cryptography>=2.1.4 (from pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.5.2 (from pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting attrs (from Automat>=0.3.0->twisted>=17.9.0->cherrybomb==0.1.0)
Using cached attrs-17.3.0-py2.py3-none-any.whl
Collecting setuptools (from zope.interface>=4.0.2->twisted>=17.9.0->cherrybomb==0.1.0)
Using cached setuptools-38.2.5-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting idna>=2.1 (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyopenssl>=17.5.0->cherrybomb==0.1.0)
Installing collected packages: hyperlink, constantly, six, attrs, Automat, incremental, setuptools, zope.interface, twisted, pycparser, cffi, idna, asn1crypto, cryptography, pyopenssl, wheel, cherrybomb
Running setup.py install for cherrybomb ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-8wz3oeu9-build/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-mxvris8y-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-8wz3oeu9-build/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-mxvris8y-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code -11 in /tmp/pip-8wz3oeu9-build/
Segmentation fault (core dumped)
cherrybomb#cherrybomb:~/cherrybomb$
I am installing this on ubuntu 17.10 x64:
cherrybomb#cherrybomb:~/cherrybomb$ uname -a
Linux cherrybomb 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cherrybomb#cherrybomb:~/cherrybomb$ python3.6 --version
Python 3.6.3
cherrybomb#cherrybomb:~/cherrybomb$
Any insight into what I'm doing wrong would be much appreciated. Thank you and have a great day!
Though this seems to be an old issue I hope leaving a reply here may be of help.
Try with sudo !!. If you weren't inside a virtual environment, maybe you didn't had the necessary privileges to install the packages system wide.