简体   繁体   中英

Getting TypeError when installing KivyMD

Getting this error when installing KivyMD via pip install https://github.com/kivymd/KivyMD/archive/master.zip

Collecting https://github.com/kivymd/KivyMD/archive/master.zip
  Downloading https://github.com/kivymd/KivyMD/archive/master.zip
     \ 10.7 MB 639 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpdb_2q5o4
         cwd: /tmp/pip-req-build-u9xq525y
    Complete output (42 lines):
    fatal: not a git repository (or any of the parent directories): .git
    running dist_info
    creating /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info
    writing /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/dependency_links.txt
    writing entry points to /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/entry_points.txt
    writing requirements to /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/requires.txt
    writing top-level names to /tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/top_level.txt
    writing manifest file '/tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/SOURCES.txt'
    writing manifest file '/tmp/pip-modern-metadata-p_dv2dq5/kivymd.egg-info/SOURCES.txt'
    creating '/tmp/pip-modern-metadata-p_dv2dq5/kivymd.dist-info'
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
        main()
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 254, in run_setup
        self).run_setup(setup_script=setup_script)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 145, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 100, in <module>
        "tests = kivymd.tools.packaging.pyinstaller:get_pyinstaller_tests",
      File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/command/dist_info.py", line 36, in run
        bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
      File "/usr/local/lib/python3.7/dist-packages/wheel/bdist_wheel.py", line 408, in egg2dist
        shutil.copy(license, os.path.join(self.distinfo_dir, license_filename))
      File "/usr/lib/python3.7/posixpath.py", line 80, in join
        a = os.fspath(a)
    TypeError: expected str, bytes or os.PathLike object, not NoneType
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpdb_2q5o4 Check the logs for full command output.

Use pip install git+https://github.com/kivymd/KivyMD.git@master . It should work fine

You can download whl file of KivyMD from here . 在此处输入图像描述

Then use pip install whlFilePath/kivymd-0.104.1-py3-none-any.whl to install.

Fox example: pip install E:/kivymd-0.104.1-py3-none-any.whl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM