首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dbn.tensorflow与win10的结合

dbn.tensorflow与win10的结合
EN

Stack Overflow用户
提问于 2022-08-12 18:15:34
回答 1查看 86关注 0票数 0

在我的代码中,我试图使用:

代码语言:javascript
复制
from dbn.tensorflow import SupervisedDBNClassification

我犯了这个错误:

代码语言:javascript
复制
Import "dbn.tensorflow" could not be resolved

有什么解决办法吗?

---------------------------------------------------------------------------------------------------------------;、;、;、

代码语言:javascript
复制
ERROR: Command errored out with exit status 1:
 command: 'c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-794c6ozn\\scipy\\setup.py'"'"'; __file__='"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-794c6ozn\\scipy\\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 pip-egg-info
     cwd: C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\
Complete output (93 lines):
Running from numpy source directory.
C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py:86: DeprecationWarning:

  `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
  of the deprecation of `distutils` itself. It will be removed for
  Python >= 3.12. For older Python versions it will remain present.
  It is recommended to use `setuptools < 60.0` for those Python versions.
  For more details, see:
    https://numpy.org/devdocs/reference/distutils_status_migration.html


  import numpy.distutils.command.sdist
Traceback (most recent call last):
  File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 251, in generate_cython
    - `pip install .`       (from a git repo or downloaded source
ModuleNotFoundError: No module named 'Cython'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
    yield saved
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
    yield
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 493, in <module>
  File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 475, in setup_package
  File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 258, in generate_cython
    if '--help' in sys.argv[1:] or '-h' in sys.argv[1]:
OSError: Cython needs to be installed in Python as a module

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\setup.py", line 415, in <module>
    setup_package()
  File "C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\setup.py", line 411, in setup_package
    setup(**metadata)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
    return installer(requirement)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
    return cmd.easy_install(req)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\command\easy_install.py", line 7
EN

回答 1

Stack Overflow用户

发布于 2022-08-12 18:49:58

如果您是通过pip安装的,您可能安装了这个库:分散-蓝牙-网络。不是你要找的东西。

你只需遵守Github储存库的指示就行了。我会写在下面:

  1. 首先克隆存储库:git clone https://github.com/albertbup/deep-belief-network.git
  2. 移到克隆的存储库文件夹:cd deep-belief-network
  3. 如果您正在使用环境,则创建并激活它。
  4. 执行pip install -r requirements.txt以安装所需的所有需求。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73338284

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档