Install Python pycryptodome libraries for Apache Spark in Azure Synapse

sachin gupta 376 Reputation points
2023-02-01T00:59:23.05+00:00

Hi All,

I am tying to install pycryptodome to azure synapse notebook. PFB details.

scenario - I have created a notebook and Apache spark pool in azure synapse. I used the Below command to list the packages installed on pool. I don't see my required packages in the list. So I tried to install it using requirement.txt file and requirement.yml file in package section of Apache spark pool.

steps performed-

pip list : command to see the packages already installed.

created below file and uploaded in package section of Apache Spark pool.

requirement.txt:

pycryptodome==3.16.0

requirement.yml code:

name: pycrypto_lib

channels:

  • defaults

dependencies:

  • pip:
    • pycryptodome

error= PFA screenshot

Error_Screenshot.png

please share your suggestion. Thanks!


Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2023-02-03T08:35:41.8+00:00

    Hello @sachin gupta

    Thanks for the question and using MS Q&A platform.

    As per the repro from my end - I'm able to successfully install the pycryptodome==3.16.0 using the requirement.txt file method.

    Note: I had tested on Spark Runtime 3.1 version. In case, if you spark runtime is different please do let me know I can re-verfiy with the spark runtime version which you are using.

    User's image

    To verify if the correct versions of the correct libraries are installed from PyPI, run the following code:

    import pkg_resources
    for d in pkg_resources.working_set:
         print(d)
    

    Successfully installed & verfied the package installtion named: pycryptodome==3.16.0

    User's image

    For more details, refer to Manage session-scoped packages.

    Hope this helps. Do let us know if you any further queries.


    Please don’t forget to Accept Answer wherever the information provided helps you, this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.