Search code examples
salt-project

SaltStack : Unable to install a salt dependency library manually


I am trying to install a library pycryptodome on the salt master using pip and post installation version report doesn't show it correctly. However what i notice is the the version of the new installation get updated against pycrypto and not pycryptodome.

Do i need to reload anything. Or is there another way to install it ?

Below the version report.

ro@salt:~$ sudo salt --versions-report 
Salt Version:
           Salt: 3000.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.4.2
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
         Jinja2: 2.8
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
   python-gnupg: 0.3.8
         PyYAML: 3.11
          PyZMQ: 15.2.0
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 4.4.0-178-generic
         system: Linux
        version: Ubuntu 16.04 xenial

Below report is after pip3 installation of pycryptodome. You can notice the version of pycrypto changed to 3.9.7 from 2.6.1

ro@salt:~$  salt --versions-report 
Salt Version:
           Salt: 3000.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.4.2
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
         Jinja2: 2.8
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 3.9.7
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
   python-gnupg: 0.3.8
         PyYAML: 3.11
          PyZMQ: 15.2.0
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 4.4.0-178-generic
         system: Linux
        version: Ubuntu 16.04 xenial

ro@salt:~$ 

Solution

  • I was able to solve this problem with help from my colleague. The documentation for pycryptodome says that its drop-in replacement for pycrypto which is the reason it displays that way. Installing pycryptodomex will recognize pycryptodome as a standalone package.

    ro@salt:~$ sudo salt --versions-report
    Salt Version:
               Salt: 3000.2
    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: 2.4.2
          docker-py: Not Installed
              gitdb: 0.6.4
          gitpython: 1.0.1
             Jinja2: 2.8
            libgit2: Not Installed
           M2Crypto: Not Installed
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.6.2
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: Not Installed
       pycryptodome: 3.9.7
             pygit2: Not Installed
             Python: 3.5.2 (default, Apr 16 2020, 17:47:17)
       python-gnupg: 0.3.8
             PyYAML: 3.11
              PyZMQ: 15.2.0
              smmap: 0.9.0
            timelib: Not Installed
            Tornado: 4.5.3
                ZMQ: 4.1.4
    System Versions:
               dist: Ubuntu 16.04 xenial
             locale: UTF-8
            machine: x86_64
            release: 4.4.0-178-generic
             system: Linux
            version: Ubuntu 16.04 xenial