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: No module named 'hypothesis.internal'" #17

Closed
ianozsvald opened this issue Jan 8, 2015 · 7 comments
Closed

"ImportError: No module named 'hypothesis.internal'" #17

ianozsvald opened this issue Jan 8, 2015 · 7 comments

Comments

@ianozsvald
Copy link

At the risk of having done something stupid...

I've just tried a fresh install of both master and the pypi release. In both cases (using an Anaconda environment) into IPython if I try:

In [2]: from hypothesis import falsify
...
ImportError: No module named 'hypothesis.internal'

The same occurs if I just try import hypothesis.

Looking at my site-packages after installing with pip I see files like site-packages/hypothesis/statefultesting.py, it looks like your internal directory is being removed during install?

For the master install I did a fresh checkout (python 3.4, current Anaconda, no venv) and ran python setup.py install, I had the same problem (though the files were installed to an egg rather than a directory).

For the pip install I just used pip install hypothesis.

If I install from your master using python setup.py develop then I get the internal folder (in my checked out folder), so then the imports work.

Am I missing something silly? Maybe you've not tested your installer recently?

@DRMacIver
Copy link
Member

Hmm. That's interesting. I think I fucked up the patch release. Thanks for the report. Give me a minute and I'll fix it.

@DRMacIver
Copy link
Member

Try installing the 0.2.2 release? This should fix your problem.

(I'll still need to figure out what was actually going on in there, but the internal package wasn't supposed to be in that release at all so I've just undone the changes that accidentally made it in there. Super embarrassing)

@ianozsvald
Copy link
Author

Maybe missing an init.py in internals?
On 8 Jan 2015 18:13, "David R. MacIver" notifications@github.com wrote:

Hmm. That's interesting. I think I fucked up the patch release. Thanks for
the report. Give me a minute and I'll fix it.


Reply to this email directly or view it on GitHub
#17 (comment).

@DRMacIver
Copy link
Member

No, I think I understand. the packages property of setup.py is non-recursive, so I would have to specify that hypothesis.internal is one of the installed packages as well as hypothesis. Previously hypothesis has a flat package structure so I was able to forget about this.

At any rate the 0.2.2. release solves this by getting rid of the internals package for now because it wasn't supposed to be in the 0.2.1 release at all (it's too big a change for a patch release). Does it work for you now?

@DRMacIver
Copy link
Member

OK. I've now tested this in the 0.2.2 release and master and am pretty confident this should work correctly now. Thanks again for the report. Feel free to reopen if you're still having issues.

@ianozsvald
Copy link
Author

Confirmed working if installed from pip, cheers :-)

@DRMacIver
Copy link
Member

Hurrah.

The installer is now tested on travis BTW so this sort of thing shouldn't happen again.

DRMacIver added a commit that referenced this issue May 12, 2018
Track engine state for ease of debugging
Macavirus pushed a commit to Macavirus/hypothesis that referenced this issue May 2, 2022
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