Pydicom error

Dear all,

I dont know if anyone can help me. I am just trying to get a trajectory log into a csv file using pylinac. My code is very simple:

from pylinac import load_log


for file in glob.glob(“*.bin”):
log = load_log(file)


I have install conda and create an environment where I put pylinac. However, when I run the code I get an error message related to pydicom. I attach a screenshot of the error.

I would be very grateful if somebody has some advice.



As the error clearly states, there is an issue with pydicom. Try reinstalling pydicom to a version >1.0:

pip install pydicom --upgrade --force-reinstall

Thanks James. "pip install dicom" sorted the problem. I didnt know you could use pip within conda. Many thanks!

Yes, you can use conda and pip within the same env.

‘dicom’ is the old package name so you seem to have installed a version <1.0. What version of pylinac are you using?

Run the following and see if dicom and pydicom are listed (assuming windows; if linux use grep)
conda list | findstr “dicom”
pip freeze | findstr “dicom”

If you use "conda install pylinac" it will install pylinac 2.0.0 with all the dependencies pylinac needs (including pydicom 1.0.0). It is not installing the latest pylinac version 2.2.6. After doing this if I try to run pylinac I get the error with pydicom I posted before (which was solved by using "pip install dicom").

Should I try to run "pip install pylinac" in my environment to get the latest pylinac version (2.2.6)?

Ah! okay yes, pip is the recommended way now because of the wheel format. Let me remove the pylinac packages from anaconda. Thanks