Jun-27-2024, 12:18 PM
I tripped across ChatGPT being able to create python code for me, and it looks very useful. Im trying to create some patterns, using python to write a file in a gerber format (graphic format particular to PCB industry)
Ive installed Python , using the windows app... v3.12. I am a complete dummy/newbie here, just 20 mins in....
Chat GPT tells me that i need to install a module, and gives me this syntax "pip install pcb-tools"
When i run that, it seems to install the module correctly.
When i try to run the script, i get the following
C:\Users\johnd\python>python gerber.py
Traceback (most recent call last):
File "C:\Users\johnd\python\gerber.py", line 1, in <module>
from pcb import Gerber
ModuleNotFoundError: No module named 'pcb'
My script starts like this...
from pcb import Gerber
from pcb import primitives
# Create a new Gerber file
gerber = Gerber()
If i try to re-install the module, i get the following..
[inline]Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pcb-tools in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (0.1.6)
Requirement already satisfied: cairocffi~=0.6 in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from pcb-tools) (0.9.0)
Requirement already satisfied: cffi>=1.1.0 in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from cairocffi~=0.6->pcb-tools) (1.16.0)
Requirement already satisfied: pycparser in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from cffi>=1.1.0->cairocffi~=0.6->pcb-tools) (2.22)[/inline]
So it looks like my module is installed, but maybe its something to do with the path to it ?
Any help VERY GRATEFULLY received
Ive installed Python , using the windows app... v3.12. I am a complete dummy/newbie here, just 20 mins in....
Chat GPT tells me that i need to install a module, and gives me this syntax "pip install pcb-tools"
When i run that, it seems to install the module correctly.
When i try to run the script, i get the following
C:\Users\johnd\python>python gerber.py
Traceback (most recent call last):
File "C:\Users\johnd\python\gerber.py", line 1, in <module>
from pcb import Gerber
ModuleNotFoundError: No module named 'pcb'
My script starts like this...
from pcb import Gerber
from pcb import primitives
# Create a new Gerber file
gerber = Gerber()
If i try to re-install the module, i get the following..
[inline]Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pcb-tools in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (0.1.6)
Requirement already satisfied: cairocffi~=0.6 in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from pcb-tools) (0.9.0)
Requirement already satisfied: cffi>=1.1.0 in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from cairocffi~=0.6->pcb-tools) (1.16.0)
Requirement already satisfied: pycparser in c:\users\johnd\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from cffi>=1.1.0->cairocffi~=0.6->pcb-tools) (2.22)[/inline]
So it looks like my module is installed, but maybe its something to do with the path to it ?
Any help VERY GRATEFULLY received