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

ImportError when calling prepare() #12

Open
ajmazurie opened this issue Apr 22, 2016 · 9 comments
Open

ImportError when calling prepare() #12

ajmazurie opened this issue Apr 22, 2016 · 9 comments
Assignees
Labels

Comments

@ajmazurie
Copy link

When trying to replicate the demo at https://asciinema.org/a/18771 on my OSX box I get an ImportError. Here is the code:

from pyopy.hctsa import hctsa
hctsa.prepare()

And here is the resulting traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "project/.conda_environments/root/lib/python2.7/site-packages/pyopy/hctsa/hctsa.py", line 16, in prepare
    from hctsa_install import hctsa_prepare_engine
  File "project/.conda_environments/root/lib/python2.7/site-packages/pyopy/hctsa/hctsa_install.py", line 10, in <module>
    from pyopy.hctsa.hctsa_bindings_gen import gen_bindings
  File "project/.conda_environments/root/lib/python2.7/site-packages/pyopy/hctsa/hctsa_bindings_gen.py", line 8, in <module>
    from pyopy.hctsa.hctsa_catalog import HCTSACatalog
  File "project/.conda_environments/root/lib/python2.7/site-packages/pyopy/hctsa/hctsa_catalog.py", line 13, in <module>
    from pyopy.code import matlab_funcname_from_filename, parse_matlab_params, parse_matlab_funcdef
  File "project/.conda_environments/root/lib/python2.7/site-packages/pyopy/code.py", line 11, in <module>
    from pyopy.externals.ompc.ompcply import translate_to_str
ImportError: No module named externals.ompc.ompcply

Any idea about what is causing this?

Best, Aurélien

@astraw
Copy link
Member

astraw commented Apr 25, 2016

The best person to track this down is @sdvillal, but he broke his arm recently and it may be a little while to fix this. I did just talk to him and he plans to respond here.

@cmiller8
Copy link

cmiller8 commented May 19, 2016

I got the same error and traceback on OSX 10.11.5 El Capitan with Python 2.7.11 installed by Anaconda.

I get the same error when I try to run python hctsa_install.py install from the pyopy module folder

@yasserfarouk
Copy link

Same problem here on OSX 10.11.5

@binny-mathew
Copy link

Same problem here.

@sdvillal
Copy link
Collaborator

I think this was just a silly packaging problem. Hopefully it is fixed now. I have just updated the instructions to install pyopy + hctsa, fixed a bunch of bugs and send the first release to pypi. Can anyone confirm that the problem is solved?

I never tried before to use pyopy in non-linux systems, but everything seems to work without much trouble in OSX - which is a pleasant surprise to me.

Sorry for taking so long to answer. I will hopefully be more responsive from now on.

@sdvillal sdvillal added the bug label Jul 24, 2016
@sdvillal sdvillal self-assigned this Jul 24, 2016
@nathaliehb
Copy link

Hey, I have followed the instruction, I had to create a new environment with python 3.5 and I have installed pyopy , however, when enter the following command hctsa-cli install --engine matlab --force-download --generate-bindings

module = __import__(self.module_name, fromlist=['__name__'], level=0) File "c:\pyopy\pyopy\hctsa\hctsa_cli.py", line 5, in <module> from pyopy.hctsa.hctsa_bindings_gen import gen_bindings File "c:\pyopy\pyopy\hctsa\hctsa_bindings_gen.py", line 7, in <module> from pyopy.hctsa.hctsa_config import HCTSA_BINDINGS_FILE, HCTSA_BINDINGS_DIR File "c:\pyopy\pyopy\hctsa\hctsa_config.py", line 3, in <module> from pyopy.config import PYOPY_DIR, PYOPY_EXTERNAL_TOOLBOXES_DIR File "c:\pyopy\pyopy\config.py", line 4, in <module> from user import home ImportError: No module named 'user'

@nathaliehb
Copy link

I looked at the config.py and i believe I should have a user.py somewhere but I don't really know what to put in it...

@sdvillal
Copy link
Collaborator

sdvillal commented Oct 2, 2018

@nathaliehb unfortunately this is python 3 incompatibility (see #13). Also I never tested this on windows, so you are in terra incognita. This concrete problem is fixed in the py3 branch, but I lack bandwidth these days to retake the work there, so I would suggest to try using python 2 for the time being.

@nathaliehb
Copy link

Oh thanks for coming back to me. It was a bit frustrating today trying to install it and having to correct the bracket for the print function and other bit and for the end having to give up. Sure, I will try to create a environment with python 2 on windows and if I still struggle I will try this on my mac.

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

No branches or pull requests

7 participants