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
os.chdir(“C://Users//Rebo//Desktop//test”)
for file in glob.glob(“*.bin”):
log = load_log(file)
log.to_csv()
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.
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)?