0

enter image description here

While running a job in google cloud ML, I have included few dependent packages in setup.py . While running the job, it gives the error that cryptography is not able to build_wheel. Cryptogrpahy could be a dependent package for one of the packages that i am trying to install. Please help !!!

Appu
  • 83
  • 9

3 Answers3

0

You can configure your setup.py script to run arbitrary commands as part of installing your code; see this SO Question.

Community
  • 1
  • 1
Jeremy Lewi
  • 6,386
  • 6
  • 22
  • 37
  • after trunning this self.RunCustomCommand , I am getting an error of no such file or directory found . – Appu Apr 17 '17 at 07:37
0

To clarify Jeremy's answer a bit, a few lines after the screen shot, I see the following in the logs:

"Package libffi was not found in the pkg-config search path."

This SO answer indicates that the following needs to be run (based on cryptography's documentation)

apt-get install build-essential libssl-dev libffi-dev python-dev

Jeremy's answer contains a link to an example setup.py that runs apt-get install for python-tk. You should be able to follow the same approach with the following modification:

self.RunCustomCommand(
    ['apt-get', 'install', '-y', 'build-essential',
     'libssl-dev', 'libffi-dev', 'python-dev'])
Community
  • 1
  • 1
rhaertel80
  • 8,254
  • 1
  • 31
  • 47
  • this is still not working.. ERROR : not able to build_wheel for cryptography – Appu Apr 17 '17 at 07:25
  • Can you try running the apt-get command on your system or in a Docker container to see whether the supplied apt-get command works correctly? My guess the install process is trying to compile and build something and its failing. – Jeremy Lewi Apr 17 '17 at 12:41
  • I was able to reproduce it and it was because of the 'sudo' command, which I've removed from my post above. After removing sudo, things work correctly for me. – rhaertel80 Apr 17 '17 at 14:35
0

Errors after submitting the setup.py

Please see this link to check the log error file.

Appu
  • 83
  • 9