1

我正在尝试安装rasa x在我的 python 环境中。但我得到了错误。

这是我使用的命令:

pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple
Error initializing plugin Google = keyrings.alt.Google.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/keyring/backend.py", line 171, in _load_plugins
    init_func = ep.load()
  File "/home/user/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/home/user/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/keyrings/alt/Google.py", line 14, in <module>
    import gdata.docs.service
  File "/usr/local/lib/python3.6/dist-packages/gdata/__init__.py", line 27, in <module>
    import atom
  File "/usr/local/lib/python3.6/dist-packages/atom/__init__.py", line 133, in <module>
    CreateClassFromXMLString)
  File "/usr/local/lib/python3.6/dist-packages/atom/__init__.py", line 97, in mark_deprecated
    optional_warn_function.func_name = f.func_name
AttributeError: 'function' object has no attribute 'func_name'
Looking in indexes: https://pypi.org/simple, https://pypi.rasa.com/simple

 ERROR: Command errored out with exit status 1:
      command: /usr/bin/python3 /home/user/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py
 prepare_metadata_for_build_wheel /tmp/tmpzd_tg6v2
          cwd: /tmp/pip-install-_1gbi63y/rasa-x
     Complete output (39 lines):
     running dist_info
     creating /tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info
     writing /tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/PKG-INFO
     writing dependency_links to /tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/dependency_links.txt
     writing requirements to /tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/requires.txt
     writing top-level names to /tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/top_level.txt
     writing manifest file '/tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/SOURCES.txt'
     reading manifest file '/tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/SOURCES.txt'
     reading manifest template 'MANIFEST.in'
     writing manifest file '/tmp/pip-modern-metadata-22lx2mpe/rasa_x.egg-info/SOURCES.txt'
     creating '/tmp/pip-modern-metadata-22lx2mpe/rasa_x.dist-info'
     Traceback (most recent call last):
       File "/home/user/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py",
 line 257, in <module>
         main()
       File "/home/user/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py",
 line 240, in main
         json_out['return_val'] = hook(**hook_input['kwargs'])
       File "/home/user/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py",
 line 110, in prepare_metadata_for_build_wheel
         return hook(metadata_directory, config_settings)
       File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 113, in prepare_metadata_for_build_wheel
         _run_setup()
       File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 72, in _run_setup
         exec(compile(code, __file__, 'exec'), locals())
       File "setup.py", line 65, in <module>
         url="https://rasa.com",
       File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
         return distutils.core.setup(**attrs)
       File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
         dist.run_commands()
       File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
         self.run_command(cmd)
       File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
         cmd_obj.run()
       File "/usr/lib/python3/dist-packages/setuptools/command/dist_info.py", line
 36, in run
         bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
       File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 443, in egg2dist
         shutil.copy(license, os.path.join(self.distinfo_dir, license_filename))
       File "/usr/lib/python3.6/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
 /home/user/.local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py
 prepare_metadata_for_build_wheel /tmp/tmpzd_tg6v2 Check the logs for full command output.
4

2 回答 2

1

这是gdata与 python 3x 不完全兼容的问题。尝试卸载它:

pip uninstall gdata

然后使用更新版本安装:

pip3 install -e git+https://github.com/dvska/gdata-python3#egg=gdata

另请参阅此 github 问题

于 2019-11-22T11:11:06.547 回答
1

python -m venv --system-site-packages ./rasachatbot
源代码 ./rasachatbot/bin/activate

在下面安装:
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple

于 2020-03-28T12:37:35.187 回答