Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ModuleNotFoundError: No module named 'semver'

Nozim Khodjaev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2023

Hello! I'm running into an issue when "semver" package are installed in one of the step in the bitbucket-pipelines.yml, but upon running the python code I see the following error:

 

Traceback (most recent call last):
File "/opt/atlassian/pipelines/agent/build/<MyRepo>/main.py", line 2, in <module>
import semver
ModuleNotFoundError: No module named 'semver'
In the requirements.txt, SemVer is set to: semver==2.13.0
Any thoughts?

1 answer

1 accepted

1 vote
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 10, 2023

@Nozim Khodjaev hi. Try to install requirements in the same step where you run you script:

 

- step:
name: Test
script:
- pip install -r requirements.txt
- python main.py

Also check that the last supported python version is 3.7

Regards, Igor. 

Nozim Khodjaev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 10, 2023

Thanks a lot @Igor Stoyanov ! That worked. Not sure if a different python version was the culprit

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events