Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't install on mac os x, python 2.7 #126

Closed
emirshekari opened this issue Aug 23, 2017 · 7 comments
Closed

can't install on mac os x, python 2.7 #126

emirshekari opened this issue Aug 23, 2017 · 7 comments

Comments

@emirshekari
Copy link

emirshekari commented Aug 23, 2017

When I try to install version 0.4.1 of textacy from terminal
it throws this error:

  Found existing installation: scipy 0.13.0b1
    DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling scipy-0.13.0b1:
   .....
OSError: [Errno 1] Operation not permitted: '/tmp/pip-flh3nu-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy-0.13.0b1-py2.7.egg-info'

I already have spaCy version 1.9.0
I can install in on my python 3 with no problem but need to work on python 2.
please advise.

@bdewilde
Copy link
Collaborator

Hi @emirshekari , that seems... weird. Can you manually uninstall the existing Python 2 scipy, then try installing textacy?

@emirshekari
Copy link
Author

so when I do sudo pip uninstall scipy, then it says:

DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling scipy-0.13.0b1:
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy-0.13.0b1-py2.7.egg-info
Proceed (y/n)? 

after typing y and return, it throws this error:
OSError: [Errno 1] Operation not permitted: '/tmp/pip-Q4sfIe-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy-0.13.0b1-py2.7.egg-info'

could it be because it is a built-in python and I cannot update it's scipy?

@bdewilde
Copy link
Collaborator

This is unfamiliar territory for me, since I've always used homebrew-installed versions of Python, but: I think in most cases, it's better not to modify the system Python at all. Plus, the pre-installed version of scipy is quite old — almost exactly four years, as you can see here).

I know this is a pain, but I'd recommend installing a non-system version of Python 2 then installing textacy and other packages into that. Is that feasible?

@emirshekari
Copy link
Author

emirshekari commented Aug 23, 2017

Thanks for the prompt response. Yet it is feasible and I actually have done this, this time I can install textacy but when I run the usage example of barack obama, then it throws this error:

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa Traceback (most recent call last): File "/Users/.../textacy_test.py", line 6, in <module> import textacy File "/usr/local/lib/python2.7/site-packages/textacy/__init__.py", line 19, in <module> from textacy import fileio File "/usr/local/lib/python2.7/site-packages/textacy/fileio/__init__.py", line 3, in <module> from .read import (read_csv, read_json, read_json_lines, read_json_mash, File "/usr/local/lib/python2.7/site-packages/textacy/fileio/read.py", line 11, in <module> from scipy.sparse import csc_matrix, csr_matrix File "/usr/local/lib/python2.7/site-packages/scipy/sparse/__init__.py", line 229, in <module> from .csr import * File "/usr/local/lib/python2.7/site-packages/scipy/sparse/csr.py", line 15, in <module> from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ ImportError: numpy.core.multiarray failed to import

@bdewilde
Copy link
Collaborator

Looks like a version issue with numpy and/or scipy. Which versions do you have installed alongside textacy?

@emirshekari
Copy link
Author

I have:
scipy 0.19.1
numpy 1.12.0

@bdewilde
Copy link
Collaborator

Google tells me that people have been having this sort of error for years; here's a good example: tensorflow/tensorflow#559

I suspect this is still using your system's numpy, rather than one that you installed into this non-system Python 2. You can try pip install -U numpy and see if that helps. I'm pretty sure this isn't an issue with textacy, though, so I'd like to close this out.

I don't know anything about your dev environment, but FWIW I use pyenv to install and switch between various versions of Python. I highly recommend it: https://github.com/pyenv/pyenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants