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

bcrypt with pypy error #49

Closed
avnr opened this issue Aug 31, 2015 · 11 comments
Closed

bcrypt with pypy error #49

avnr opened this issue Aug 31, 2015 · 11 comments

Comments

@avnr
Copy link

avnr commented Aug 31, 2015

Latest stable pypy version, bcrypt installed via pip, running on Win7 64bit:

C:\Users\...snip...>pypy
Python 3.2.5 (b2091e973da6, Oct 19 2014, 21:25:51)
[PyPy 2.4.0 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import bcrypt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\pypy3-2.4.0-win32\site-packages\bcrypt\__init__.py", line 23, in <module>
    from bcrypt import _bcrypt
ImportError: cannot import name '_bcrypt'

I've compared the pypy site-packages/bcrypt directory with the corresponding python site-packages/bcrypt, and the python directory has a file _bcrypt.pyd which is not present under pypy.

Any idea?

Thanks!

@alex
Copy link
Member

alex commented Aug 31, 2015

Unfortunate PyPy3 does not have a release which supports cffi 1.0, for now your best bet would be to pin to a lower version of bcrypt.

@alex alex closed this as completed Aug 31, 2015
@dstufft
Copy link
Member

dstufft commented Aug 31, 2015

Probably we should do like what was done on cryptography and error during install?

@alex
Copy link
Member

alex commented Aug 31, 2015

That seems like it would be a better UX, yeah.

On Mon, Aug 31, 2015 at 4:43 PM, Donald Stufft notifications@github.com
wrote:

Probably we should do like what was done on cryptography and error during
install?


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

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084

@avnr
Copy link
Author

avnr commented Aug 31, 2015

A small note on the README could have saved me several hours trying to figure what went wrong. Currently it just says "This library... will run on Python 2.6+, 3.2+, and PyPy."

@alex
Copy link
Member

alex commented Aug 31, 2015

Good point. Let's file an issue to update the README (and setup.py)

On Mon, Aug 31, 2015 at 4:46 PM, avnr notifications@github.com wrote:

A small note on the README could have saved me several hours trying to
figure what went wrong. Currently it just says "This library... will run on
Python 2.6+, 3.2+, and PyPy."


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

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084

@alex
Copy link
Member

alex commented Aug 31, 2015

Sorry about the crappy UX!

On Mon, Aug 31, 2015 at 4:47 PM, Alex Gaynor alex.gaynor@gmail.com wrote:

Good point. Let's file an issue to update the README (and setup.py)

On Mon, Aug 31, 2015 at 4:46 PM, avnr notifications@github.com wrote:

A small note on the README could have saved me several hours trying to
figure what went wrong. Currently it just says "This library... will run on
Python 2.6+, 3.2+, and PyPy."


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

"I disapprove of what you say, but I will defend to the death your right
to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084

@avnr
Copy link
Author

avnr commented Aug 31, 2015

No sweat, keep up the good work, its a great package.

@ghost
Copy link

ghost commented Feb 5, 2016

Just a heads up but this is still not resolved; namely on Ubuntu 14.04 LTS.

@sabirajan
Copy link

Hi All,
I have the same issue with bcrypt, kindly let me know if you were able to figure out a solution.
Environment:

Ubuntu 16.04
Python 2.7
Jython 2.7

Error

Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK Server VM (Oracle Corporation)] on java1.8.0_162
Type "help", "copyright", "credits" or "license" for more information.

import sys
sys.path.append('/home/vroadmin/pypy2-v6.0.0-linux32/site-packages')
sys.path.append('/usr/local/lib/python2.7/dist-packages/commcol-1.0.0-py2.7.egg')
sys.path.append('/usr/local/lib/python2.7')
sys.path.append('/usr/local/lib/python2.7/dist-packages')
sys.path.append('/usr/lib/python2.7')
sys.path.append('/usr/lib/python2.7/plat-i386-linux-gnu')
sys.path.append('/usr/lib/python2.7/lib-tk')
sys.path.append('/usr/lib/python2.7/lib-old')
sys.path.append('/usr/lib/python2.7/lib-dynload')

sys.path.append('/usr/lib/python2.7/dist-packages')
import bcrypt
Traceback (most recent call last):
File "", line 1, in
File "/home/vroadmin/pypy2-v6.0.0-linux32/site-packages/bcrypt/init.py", line 23, in
from bcrypt import _bcrypt
ImportError: cannot import name _bcrypt

Note that python itself doesn't have any issues with bcrypt, imports properly.

Thanks

@reaperhulk
Copy link
Member

Jython can't run C extensions built against cffi so bcrypt can't work, sorry.

@sabirajan
Copy link

Ok, thanks

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants