When trying to install spaCy into my home directory with
pip install --user spacy
I run into a problem with MurmurHash. Are there perhaps some hard coded paths in that package? Here's what I get from pip:
Downloading spacy-0.40.tar.gz (24.3MB): 24.3MB downloaded
Running setup.py (path:/tmp/pip_build_patrick/spacy/setup.py) egg_info for package spacy
zip_safe flag not set; analyzing archive contents...
headers_workaround.__init__: module references __file__
Installed /tmp/pip_build_patrick/spacy/headers_workaround-0.17-py2.7.egg
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_patrick/spacy/setup.py", line 138, in <module>
main(MOD_NAMES, use_cython)
File "/tmp/pip_build_patrick/spacy/setup.py", line 125, in main
run_setup(exts)
File "/tmp/pip_build_patrick/spacy/setup.py", line 113, in run_setup
headers_workaround.install_headers('murmurhash')
File "/tmp/pip_build_patrick/spacy/headers_workaround-0.17-py2.7.egg/headers_workaround/__init__.py", line 31, in install_headers
shutil.copy(path.join(src_dir, filename), path.join(dest_dir, filename))
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/include/murmurhash/MurmurHash3.h'
Complete output from command python setup.py egg_info:
zip_safe flag not set; analyzing archive contents...
headers_workaround.__init__: module references __file__
Installed /tmp/pip_build_patrick/spacy/headers_workaround-0.17-py2.7.egg
running egg_info
creating pip-egg-info/spacy.egg-info
writing requirements to pip-egg-info/spacy.egg-info/requires.txt
writing pip-egg-info/spacy.egg-info/PKG-INFO
writing top-level names to pip-egg-info/spacy.egg-info/top_level.txt
writing dependency_links to pip-egg-info/spacy.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/spacy.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/spacy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/spacy.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_patrick/spacy/setup.py", line 138, in <module>
main(MOD_NAMES, use_cython)
File "/tmp/pip_build_patrick/spacy/setup.py", line 125, in main
run_setup(exts)
File "/tmp/pip_build_patrick/spacy/setup.py", line 113, in run_setup
headers_workaround.install_headers('murmurhash')
File "/tmp/pip_build_patrick/spacy/headers_workaround-0.17-py2.7.egg/headers_workaround/__init__.py", line 31, in install_headers
shutil.copy(path.join(src_dir, filename), path.join(dest_dir, filename))
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/include/murmurhash/MurmurHash3.h'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_patrick/spacy
Storing debug log for failure in /home/patrick/.pip/pip.log
Hmm. I'll have a think about the best way to address this.
spaCy depends on header files for murmurhash and numpy during compilation. It tries to install these in the directory indicated by sys.prefix. This works fine if you're using a virtualenv, and fine if you do a system-wide install --- but, I didn't think of the case you raise, where you want a local install without a virtualenv.
Python packaging is really bad, so it's hard to support everything smoothly.
The installation process I'm using is actually a workaround for a long-standing bug in setuptools: you can't specify a package as both install_requires and setup_requires. This means setup_requires is mostly useless, but this bug has been around for over a year, with no real proposed solution.
So: I'll figure out what to do here. But, in the meantime, you could just use virtualenv?
Hi, I got another problem related to murmurhash when installing the package. (with sudo pip install)
It states:
clang: error: no such file or directory: 'murmurhash/mrmr.c'
clang: error: no input files
error: command 'cc' failed with exit status 1
I am not sure how to deal with it. Do I miss some files related to the c language?
Hi, @everdark. I have the exact same issue. Did you manage to solve it? Never mind. I solved by upgrading setuptools.
@mdtux89 Somehow i decided not to use this module so i didn't try to solve it anymore. :) anyway thanks for the info.
This should be fixed in the next release, as the build process has been redesigned and there's a much better test infrastructure in place.
I hope you'll try again with the library if you need NLP in future.
No distributions at all found for murmurhash<0.27,>=0.26 (from spacy==1.9.0) still happening during the installation on spacy 1.9.0
any suggestions? thinks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
No distributions at all found for murmurhash<0.27,>=0.26 (from spacy==1.9.0) still happening during the installation on spacy 1.9.0
any suggestions? thinks