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

cmatrices lib path #244

Closed
pieper opened this issue Apr 21, 2017 · 3 comments
Closed

cmatrices lib path #244

pieper opened this issue Apr 21, 2017 · 3 comments

Comments

@pieper
Copy link
Contributor

pieper commented Apr 21, 2017

I did a fresh install of the current version on a linux VM (Amazon Linux AMI release 2016.09) following the installation instructions.

Then importing to python gives this error:

In [1]: import radiomics
Error loading C extensions, switching to python calculation:
Traceback (most recent call last):
  File "radiomics/__init__.py", line 233, in <module>
    from radiomics import _cmatrices as cMatrices
ImportError: cannot import name _cmatrices

As a workaround, this allows me to import:

sys.path.append('/home/pieper/pyradiomics/build/lib.linux-x86_64-2.7/radiomics')

Should we add this to the documentation or is there a better way to solve this?

@JoostJM
Copy link
Collaborator

JoostJM commented Apr 21, 2017

@pieper, what is radiomics.__path__? It is possible/likely that this points to your repository (i.e. it's running in development mode). If so, first run python setup.py develop to make sure the C extensions are also available in source code.

I thought I included this in the FAQ, but apparently not, I'll correct this in a future PR.

pieper added a commit that referenced this issue Apr 21, 2017
Set up developer mode so cmatrices shared library is accessible.

Addresses [issue #244](#244)
@pieper
Copy link
Contributor Author

pieper commented Apr 21, 2017

what is radiomics.path?

In [2]: radiomics.__path__
Out[2]: ['radiomics']

Thanks @JoostJM , running sudo python setup.py develop resolves the issue.

I created a pull request to update the docs. Can you confirm the wording is appropriate and merge?

JoostJM added a commit to JoostJM/pyradiomics that referenced this issue Apr 24, 2017
JoostJM added a commit to JoostJM/pyradiomics that referenced this issue Apr 24, 2017
@JoostJM
Copy link
Collaborator

JoostJM commented Apr 25, 2017

Resolved by #245 and #233

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

No branches or pull requests

2 participants