Notes for setting up pydicom on macOS

Official setup procedure has a part that assumes a Debian-based Linux environment, so the procedure when setting up on macOS Leave

Environmental information

Setup procedure

pydicom

$ pip install pydicom

Optional libraries

$ pip install numpy
$ pip install pillow

CharPyLS

$ pip install cython
$ pip install git+https://github.com/Who8MyLunch/CharPyLS

GDCM

A little time-consuming part without Anaconda Refer to Installing the Python GDCM bindings without Conda and write the description for Ubuntu / Debian on macOS. Arrange for

$ brew install gdcm

#Check the location of installed related files
$ find /usr -name gdcm.py
/usr/local/lib/python3.8/site-packages/gdcm.py
/usr/local/Cellar/gdcm/3.0.7_1/lib/python3.8/site-packages/gdcm.py

$ find /usr -name "libgdcmCommon.*"
/usr/local/lib/libgdcmCommon.3.0.dylib
/usr/local/lib/libgdcmCommon.3.0.7.dylib
/usr/local/lib/libgdcmCommon.dylib
/usr/local/Cellar/gdcm/3.0.7_1/lib/libgdcmCommon.3.0.dylib
/usr/local/Cellar/gdcm/3.0.7_1/lib/libgdcmCommon.3.0.7.dylib
/usr/local/Cellar/gdcm/3.0.7_1/lib/libgdcmCommon.dylib

#Copy related files to pyenv environment
$ cd ~/.pyenv/versions/3.8.5/lib/python3.8/site-packages/
$ cp /usr/local/lib/python3.8/site-packages/gdcm.py .
$ cp /usr/local/lib/python3.8/site-packages/gdcmswig.py .
$ cp /usr/local/lib/python3.8/site-packages/_gdcmswig* .
$ cp /usr/local/lib/libgd* .

ʻImport gdcm` on the Python prompt and OK if no error occurs

Recommended Posts

Notes for setting up pydicom on macOS
Notes on setting up tensorflow-gpu on MacBook Pro (Mid 2012)
Setting up grub on CentOS 8
Setting up OpenSSH on Arch Linux
Ansible playbook for setting up Python preferences using pyenv on Mac
Notes on nfc.ContactlessFrontend () for nfcpy in python
Notes for installing Sublime Text on Ubuntu
Notes on Flask
Notes for using TensorFlow on Bash on Ubuntu on Windows
Install Python and libraries for Python on MacOS Catalina
[Note] The story of setting up the SDK for Python of Azure IoT Hub on Linux
Notes on creating a python development environment on macOS Catalina
Notes on writing config files for Python Note: configparser
Notes on neural networks
Celery notes on Django
Notes on installing PycURL
Notes on using Alembic
Notes on SciPy.linalg functions