Plugin icon is not visible
Closed this issue · 26 comments
@DCelectronics
You got Requirement.txt getting installed using which python verison on windows?
I am not able to requirement.txt fulfilled.
Python 3.9.1
Windows 10
pip3 install -r C:\Users\Ecloud12\AppData\Roaming\kicad\scripting\plugins\KiBuzzard\requirements.txt --user
Collecting bezier==2020.5.19
Using cached bezier-2020.5.19.tar.gz (313 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\ecloud12\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Ecloud12\AppData\Local\Temp\pip-install-qej7lz22\bezier_38a8494f4d2546afb71ea3083aca8ecb\setup.py'"'"'; file='"'"'C:\Users\Ecloud12\AppData\Local\Temp\pip-install-qej7lz22\bezier_38a8494f4d2546afb71ea3083aca8ecb\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Ecloud12\AppData\Local\Temp\pip-pip-egg-info-pvzpdpcx'
cwd: C:\Users\Ecloud12\AppData\Local\Temp\pip-install-qej7lz22\bezier_38a8494f4d2546afb71ea3083aca8ecb
Complete output (1 lines):
The BEZIER_INSTALL_PREFIX environment variable must be set.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/b9/0c/b1982f93c36fc06850a3880bb693bf24a047946633ca7403664836b9da9e/bezier-2020.5.19.tar.gz#sha256=ff75337e5bb4385376aeaa48fc941bcd61b528df43a1e938bfb07fe7d924b19c (from https://pypi.org/simple/bezier/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement bezier==2020.5.19
ERROR: No matching distribution found for bezier==2020.5.19
@iharshadec
I got the requirements installed in Windows with Python3.8.?
The most important step that enabled me to successfully install the requirements (on both Windows and Linux) was to upgrade the pip first by running:
python3 -m pip install --upgrade pip
Also, look how I ran the requirements installation on Windows below.
Last thing, I added the path (shown in the warning above) in my Environment Variables for the user only.
I got Bezier installed with Greg's tip on how to set variable. Now I have installed all requirement successfully.
And I downloaded @DCelectronics code and pasted in
C:\Users\Ecloud12\AppData\Roaming\kicad\scripting\plugins\
But I do not see KiBuzzard Icon on pcbnew.
I did Refresh Plugins and Restarted KiCad as well. On @DCelectronics there is no option to generate issue/ticket so I did here itself.
@iharshadec Which branch did you download?
@iharshadec Which branch did you download?
I downloaded your main branch.
I assume you have installed the prerequisites recursively.
I do not see a TMP or TEMP in your environment variables.
I assume you have installed the prerequisites recursively.
I do not see a TMP or TEMP in your environment variables.
I am not sure then I am missing something major. I was going thru other issues in detail but if you can reference me I can look over that.
Is downloading and using your main branch is OK?
Yes my main branch is up to date.
Can you revert the changes in your downloaded files from this update 98da54e
change line 118 to
filepath = os.environ['KIPRJMOD'] + "/" + self.buzzard_label_library_path
Ok, Changed line 118
Still I do not see KiBuzzard Icon on my Plugin list.
@DCelectronics line 118 change is to not have that TMP or TEMP as PATH?
It was a finicky and you need to restart KiCad (not only PcbNew)
Yes the tempfile.gettempdir()
in line 118 an the import tempfile
in line 6 are used save to system TMP location.
It was a finicky and you need to restart KiCad (not only PcbNew)
Yes thetempfile.gettempdir()
in line 118 an theimport tempfile
in line 6 are used save to system TMP location.
Restarted KiCad -- Still no KiBuzzard Icon.
KiBuzzard.zip
Let me restart my machine as well.
I am comparing my files with your zip
and I see that you are missing config.ini and requirements.txt
I am comparing my files with your zip
and I see that you are missing config.ini and requirements.txt
Oh ! I did download from github website. I think I need to clone recursively your repo?
You have to clone recursively (I have done it manually in Win10) to get the requirements.
Here is my working zip file
@iharshadec I updated the zip file (have another user on Win10 and had issues even after downgrading to python3.8.x After using the updated zip file the plugin icon appeared.
KiBuzzard.zip
These files should save the footprint in the c:\Users\Ecloud12\AppData\Temp
You have to clone recursively (I have done it manually in Win10) to get the requirements.
Here is my working zip file
KiBuzzard.zipThese files should save the footprint in the c:\Users\Ecloud12\AppData\Temp
.
I really appreciate your help @DCelectronics
I just have to replace your working KiBuzzard folder to this one -- Correct?
One directory up (inside directory plugins).
It has all the working deps icons and the kitchen sink.
I am really crossing my fingers that this would work for you.
One directory up.
It has all the working deps icons and the kitchen sink.
I am really crossing my fingers that this would work for you.
You have done a lot ! I think it's getting late there for you.
I think there is something else that is messing up and Icon is not coming up next to InteractiveBOM icon I have. :-(
I will try to dig bit more and see what's the thing I am doing wrong.
Would you please type python3 --version
instead of python --version
in your terminal.
I am suspecting the python3 may not be defined. I may be wrong.
Would you please type
python3 --version
instead ofpython --version
in your terminal.
I am suspecting the python3 may not be defined. I may be wrong.
Crap ! I see python3 is not recognized as command on my windows machine. Let me figure out that first and see how can I get python3 as command.
For the time being, change the python3 to python inside this file
https://github.com/DCelectronics/KiBuzzard/blob/main/KiBuzzard/__init__.py
This is a workaround, but there are tutorials how to set python3 in windows.
https://feaforall.com/how-to-install-python-3-on-windows-and-set-the-path/
For the time being, change the python3 to python inside this file
https://github.com/DCelectronics/KiBuzzard/blob/main/KiBuzzard/__init__.py
This is a workaround, but there are tutorials how to set python3 in windows.
https://feaforall.com/how-to-install-python-3-on-windows-and-set-the-path/
Now this looks like something else as now I got python3 as a command.
I also copied config.ini file and requirement.txt as well.
Also requirements are installed
Here is my full plugin folder just in case I am putting the folder wrong way.
OK, check if this outputs anything in you CMD terminal.
python3 C:\Users\Ecloud12\AppData\Roaming\kicad\scripting\plugins\KiBuzzard\deps\buzzard\buzzard.py "test" -o ki-5.1.x -stdout
I looked at your files and they are OK. I noticed that you had an .git folder inside \plugins\KiBuzzard\ folder which I didn't have in my Win10 setup.
Do you have python2 installed and configured as python when you call it in your CMD terminal?
OK, check if this outputs anything in you CMD terminal.
python3 C:\Users\Ecloud12\AppData\Roaming\kicad\scripting\plugins\KiBuzzard\deps\buzzard\buzzard.py "test" -o ki-5.1.x -stdout
I looked at your files and they are OK. I noticed that you had an .git folder inside \plugins\KiBuzzard\ folder which I didn't have in my Win10 setup.
Do you have python2 installed and configured as python when you call it in your CMD terminal?
This is what I get using that command.
Looks like bezier installtion related problem although requirement shows all things are fullfilled. I may need to downgrade my python to your one of 3.8.x
@iharshadec
I updated zip file above #7 (comment)
You should have been getting the polygon points in the terminal, starting like this:
(module "buzzardLabel" (layer "F.Cu") (tedit "6017799")
(attr virtual)
(fp_poly (pts (xy 1.12 0.02) blah blah...
I may need to downgrade my python to your one of 3.8.x
That is the version I have installed in Win10.
Conclusion:
Python 3.9.1 Looks like not working with bezier.
I installed Python 3.8.3 and setup that as python3 for windows. And I used updated .zip from @DCelectronics
This One and GUI is working on Windows 10 - Kicad 5.1.9 now.
KiBuzzard.zip