=====<<< Pymod for Anaconda3 >>>====================================================================
==
== The following lines capture the steps I followed to install
== 'pymod' to 'Anaconda3' on macOS Sequoia (Intel Mac) using 'pip3'.
==
== A "KLayout Python Module" is available under '/Applications/klayout.app/Contents/pymod-dist'
== as 'klayout-*.whl' for the 'pip3' tool.
==
== Ref: https://github.com/KLayout/klayout/issues/1040
==
== File: pymod-pip3-ana3.txt
== Author: kazzz-S
== Last modified: 2025-10-31 (as of KLayout version 0.30.4)
====================================================================================================

####################
### Installation ###
####################

(base) MacBookPro2{sekigawa} ~ (1)% conda activate klayout-qt6
(klayout-qt6) MacBookPro2{sekigawa} ~ (2)%

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (3)% pwd
/Applications/klayout.app/Contents/pymod-dist

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (4)% ll
:
drwxr-xr-x  3 sekigawa staff       96 Oct 31 21:38 .
drwxr-xr-x 10 sekigawa staff      320 Oct 31 21:39 ..
-rw-r--r--  1 sekigawa staff 17308573 Oct 31 21:07 klayout-0.30.4-cp313-cp313-macosx_10_9_x86_64.whl

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (5)% which python3
/Applications/anaconda3/envs/klayout-qt6/bin/python3

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (6)% which pip3
/Applications/anaconda3/envs/klayout-qt6/bin/pip3

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (7)% pip3 install klayout-0.30.4-cp313-cp313-macosx_10_9_x86_64.whl
:
Processing ./klayout-0.30.4-cp313-cp313-macosx_10_9_x86_64.whl
Installing collected packages: klayout
Successfully installed klayout-0.30.4

(klayout-qt6) MacBookPro2{sekigawa} pymod-dist (8)% pip3 list | grep klayout
klayout         0.30.4

(klayout-qt6) MacBookPro2{sekigawa} site-packages (9)% pwd
/Applications/anaconda3/envs/klayout-qt6/lib/python3.13/site-packages

(klayout-qt6) MacBookPro2{sekigawa} site-packages (10)% ll -rt
:
:
drwxr-xr-x  41 sekigawa staff  1312 Oct 31 21:45 klayout
drwxr-xr-x   4 sekigawa staff   128 Oct 31 21:45 pya
drwxr-xr-x  10 sekigawa staff   320 Oct 31 21:45 klayout-0.30.4.dist-info

(klayout-qt6) MacBookPro2{sekigawa} work (11)% python3
Python 3.13.9 | packaged by conda-forge | (main, Oct 22 2025, 23:31:04) [Clang 19.1.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import klayout
>>> klayout.__version__
'0.30.4'
>>> help(klayout)

Help on package klayout:

NAME
    klayout

PACKAGE CONTENTS
    db (package)
    dbcore
    lay (package)
    laycore
    lib (package)
    lib_ant
    lib_db
    lib_edt
    lib_gsi
    lib_img
    lib_laybasic
    lib_layview
    lib_lib
    lib_lym
    lib_pex
    lib_pya
    lib_rba
    lib_rdb
    lib_tl
    libcore
    pex (package)
    pexcore
    pya (package)
    pyacore
    rdb (package)
    rdbcore
    tl (package)
    tlcore

VERSION
    0.30.4

FILE
    /Applications/anaconda3/envs/klayout-qt6/lib/python3.13/site-packages/klayout/__init__.py
====================================================================================================

####################
###   Testing    ###
####################
Visit "https://www.klayout.org/klayout-pypi/" and save the Code in the name of "sample.py".

(klayout-qt6) MacBookPro2{sekigawa} work (1)% ll
:
drwxr-xr-x    3 sekigawa staff   96 Oct 31 21:51 .
drwxr-xr-x+ 137 sekigawa staff 4384 Oct 31 21:54 ..
-rw-r--r--    1 sekigawa staff 1081 Oct 31 21:50 sample.py

(klayout-qt6) MacBookPro2{sekigawa} work (2)% python3  sample.py
(klayout-qt6) MacBookPro2{sekigawa} work (3)% ll
:
drwxr-xr-x    4 sekigawa staff  128 Oct 31 21:55 .
drwxr-xr-x+ 137 sekigawa staff 4384 Oct 31 21:55 ..
-rw-r--r--    1 sekigawa staff 6316 Oct 31 21:55 basic.gds <=== generated
-rw-r--r--    1 sekigawa staff 1081 Oct 31 21:50 sample.py

[EOF]
