jssimporter / python-jss

python-jss is deprecated. Please see the wiki for alternatives.
GNU General Public License v3.0
102 stars 41 forks source link

Install via pip requires 'cryptography' #70

Open geoffklee opened 6 years ago

geoffklee commented 6 years ago

Installing via pip alongside the system python on 10.13.3 seems to be missing a dependency. After installing, I get the message

 File "/Library/Python/2.7/site-packages/urllib3/contrib/pyopenssl.py", line 47, in <module>
    from cryptography import x509
ImportError: No module named cryptography

So, it looks as if cryptography is actually an unresolved dependency of pyopenssl, which is included in urllib3.

Interestingly, I don't get this issue if I install into a virtualenv - pip installs cryptography along with all the other packages...

sheagcraig commented 6 years ago

Hello @gkluoe

I need to update the README here, as it talks about JSSImporter (which doesn't use requests any longer), and I need to update the package setup to work around this. And also remove references to easy_install!

You are correct that cryptography is needed; I forget the details already, but this is a change from older versions of macOS. I'll put this on the TODO list, but for anyone checking this issue out, the resolution is of course pip install cryptography.

grahampugh commented 5 years ago

@gkluoe can you check with the latest version of python-jss? We haven't updated the version in pip for a while (I think only Shea has the rights to do that), so you'll have to install from source (or just use the JSSImporter install package and make sure to add /Library/Application Support/JSSImporter to your python path.

I'm no expert, but @mosen changed the requests adapter method in May 2018, removing pyopenssl, so I don't think you will have the problem any more.