← Back to team overview

kicad-developers team mailing list archive

Re: Opening pcbnew from kicad: ImportError: No module named pcbnew

 

Hi!

Ok, redo from scratch.
I'm cleaning up the build directory now...

$ git pull
$ git checkout -f
$ rm -r build
$ cat ./go.sh
#!/bin/bash
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release \
      -DKICAD_SCRIPTING=ON \
      -DKICAD_SCRIPTING_MODULES=ON \
      -DKICAD_SCRIPTING_WXPYTHON=ON \
      -DCMAKE_PREFIX_PATH=~/SW \
      -DCMAKE_INSTALL_PREFIX=~/SW \
      -DDEFAULT_INSTALL_PATH=~/SW \
      ../../
make -j8
make install
$ ./go.sh

Building works now, but:

$ cd ~/SW/bin
$ ./kicad

and then clicking on pcbnew delivers the same:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
ImportError: No module named pcbnew

I cannot tell if that is something serious. I would just not ignore
it without understanding it.

Clemens


On 2016-01-08 13:52, Wayne Stambaugh wrote:
> If the _*.kiface files are not in the same path as your executable
> files, then this is your problem.  The kiface (don't let the naming
> confuse you, they are shared objects) files must reside in the same path
> as the executable files due to the way they are loaded.
> 
> On 1/8/2016 7:41 AM, Nick Østergaard wrote:
>> Hmm, did you specify the prefix paths the first time you ran cmake? It
>> looks like it is still trying to install some file (here _cvpcb.kface)
>> to a default location and not your user folder. but the make
>> DESTDIR=something install works fine for me. It has done way pre 4.0.1
>> and still on latest product.
>>
>> 2016-01-08 2:11 GMT+01:00 Clemens Koller <cko@xxxxxxxxx>:
>>> Hello, Jon!
>>>
>>> On 2016-01-08 01:36, Jon Neal wrote:
>>>> Is there a reason you installed KiCad in ~/SW/usr/local/bin/kicad?
>>>
>>> I don't want to merge/sudo the test builds into my (production)
>>> distribution. So, I just tried to stay in ~/SW.
>>>
>>>> That seems like a strange place to install it.
>>>> The cmake defaults work fine for me and coexist
>>>> just fine with a stable install!
>>>
>>> So, you sudo make install?
>>>
>>>> How did you specify that install location?
>>>
>>> I was cheating with:
>>>
>>> cmake -DCMAKE_BUILD_TYPE=Release \
>>>       -DKICAD_SCRIPTING=ON \
>>>       -DKICAD_SCRIPTING_MODULES=ON \
>>>       -DKICAD_SCRIPTING_WXPYTHON=ON \
>>>       ../../
>>> make -j8
>>> make DESTDIR=~/SW install
>>>
>>> because:
>>>
>>> cmake -DCMAKE_BUILD_TYPE=Release \
>>>       -DKICAD_SCRIPTING=ON \
>>>       -DKICAD_SCRIPTING_MODULES=ON \
>>>       -DKICAD_SCRIPTING_WXPYTHON=ON \
>>>       -DCMAKE_PREFIX_PATH=~/SW \
>>>       -DCMAKE_INSTALL_PREFIX=~/SW \
>>>       -DDEFAULT_INSTALL_PATH=~/SW \
>>>       ../../
>>> make -j8
>>> make install
>>>
>>> fails with:
>>>
>>> -- Installing: /home/admin/SW/share/applications/pcbnew.desktop
>>> -- Installing: /home/admin/SW/share/applications/bitmap2component.desktop
>>> -- Installing: /usr/local/bin/_cvpcb.kiface
>>> CMake Error at cvpcb/cmake_install.cmake:50 (file):
>>>   file INSTALL cannot copy file
>>>   "/home/admin/share/project/kicad-src/src/build/release/cvpcb/_cvpcb.kiface"
>>>   to "/usr/local/bin/_cvpcb.kiface".
>>> Call Stack (most recent call first):
>>>   cmake_install.cmake:96 (include)
>>>
>>> Is there a bug hidden or is it just my recklessness?
>>>
>>> Clemens
>>>
>>>
>>>
>>>> On Thu, Jan 7, 2016 at 7:12 PM Clemens Koller <cko@xxxxxxxxx <mailto:cko@xxxxxxxxx>> wrote:
>>>>
>>>>     Hi, There!
>>>>
>>>>     I am running kicad-latest for testing purposes in my home directory:
>>>>     ~/SW/usr/local/bin/kicad
>>>>     There is also kicad-4.0.1 in /usr/bin/kicad.
>>>>
>>>>
>>>>     To test the latest stuff from you, I
>>>>
>>>>     1. open kicad-latest from a terminal/console:
>>>>     [admin@black bin]$ pwd
>>>>     /home/admin/SW/usr/local/bin
>>>>     [admin@black bin]$ ./kicad
>>>>
>>>>     2. start pcbnew via hotkey or by clicking the button.
>>>>
>>>>     Then, I get the complain:
>>>>     [admin@black bin]$ ./kicad
>>>>     Traceback (most recent call last):
>>>>       File "<string>", line 3, in <module>
>>>>     ImportError: No module named pcbnew
>>>>
>>>>
>>>>     What's the best way to test kicad-latest not interfering with the distro's
>>>>     installation?
>>>>
>>>>     Greets,
>>>>
>>>>     Clemens (CKO)
>>>>
>>>>     _______________________________________________
>>>>     Mailing list: https://launchpad.net/~kicad-developers
>>>>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>     Unsubscribe : https://launchpad.net/~kicad-developers
>>>>     More help   : https://help.launchpad.net/ListHelp
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References