kivent icon indicating copy to clipboard operation
kivent copied to clipboard

Error while install cymunk, No attribute filename

Open kzulfazriawan opened this issue 7 years ago • 3 comments

so I was installing new Kivent with Python 3.6 on virtualenv, I followed the instruction for execute the install python setup.py build_ext install

Using distutils
Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    cymunk_dirname = loader.path if hasattr(loader, 'path') else loader.filename
AttributeError: 'NoneType' object has no attribute 'filename'

kzulfazriawan avatar Jan 11 '18 11:01 kzulfazriawan

Looks like this area has changed in 3.4 and above https://github.com/kivy/kivent/blob/master/modules/cymunk/setup.py#L107

it looks like we need to be using https://docs.python.org/3.6/library/importlib.html#importlib.util.find_spec in 3.4+

Kovak avatar Jan 11 '18 17:01 Kovak

you must install cymunk first: from https://github.com/kivy/cymunk with setup.py install and after kivent_cymunk I also install kivent_core

sergeLabo avatar Jan 30 '18 08:01 sergeLabo

So in the end how to solve this problem?

root@k1:~/Desktop/kivent/modules/cymunk# python3 -V
Python 3.6.7

root@k1:~/Desktop/kivent/modules/cymunk# python3 setup.py build_ext install
Using distutils
Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    cymunk_dirname = loader.path if hasattr(loader, 'path') else loader.filename
AttributeError: 'NoneType' object has no attribute 'filename'

root@k1:~/Desktop/kivent/modules/cymunk# python3 setup.py build_ext install
Using distutils
Traceback (most recent call last):
  File "setup.py", line 107, in <module>
    loader = pkgutil.find_spec("cymunk")
AttributeError: module 'pkgutil' has no attribute 'find_spec'

Here I tried to change your setup file:

root@k1:~/Desktop/kivent/modules/cymunk# python3 setup.py build_ext install
Using distutils
Traceback (most recent call last):
  File "setup.py", line 107, in <module>
    loader = util.find_spec("cymunk")
NameError: name 'util' is not defined

root@k1:~/Desktop/kivent/modules/cymunk# python3 setup.py build_ext install
Using distutils
Traceback (most recent call last):
  File "setup.py", line 107, in <module>
    loader = importlib.util.find_spec("cymunk")
NameError: name 'importlib' is not defined

vldanch avatar Oct 15 '18 07:10 vldanch