Score:1

How to fix python module not found error with jenkins?

cn flag

I ran pip freeze command with my jenkins job and below is the output

pip freeze 
fpdf==1.7.2
textfile==0.1.4

pip install textfile 
Requirement already satisfied: textfile in c:\python39\lib\site-packages (0.1.4)

But when I ran the python script as a job, getting error as below.

 $ python C:\Users\ADMINI~1\AppData\Local\Temp\jenkins2938633000292670144.py
Traceback (most recent call last):
  File "C:\Users\ADMINI~1\AppData\Local\Temp\jenkins2938633000292670144.py", line 1, in <module>
    import textile
ModuleNotFoundError: No module named 'textile'
Build step 'Execute Python script' marked build as failure
No emails were triggered.
Finished: FAILURE
Score:0
ar flag
pip install text*f*ile 
Requirement already satisfied: textfile in c:\python39\lib\site-packages (0.1.4)
ModuleNotFoundError: No module named 'text*i*le'

It's not complaining that textfile is not found; it's complaining that textile is not found.

Install textile and try again.

Sara June avatar
cn flag
my bad.. Thank you very much.
vidarlo avatar
ar flag
No problem. We all make similar silly mistakes :) I'd recommend a [rubber duck](https://rubberduckdebugging.com/) for first instance debugging. The best thing is that they have a very strict code of secrecy with regards to what you tell them :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.