获取和运行本书代码 讨论区


#145

你好,我在win10下直接pip了没带gpu的。。请问现在想要gpu要怎么办啊,删掉原版吗


#146

然后装了gu-80后现在导入不了mxnet了显示[WinError 126] 找不到指定的模块。


#147

贴一下error?建议先pip remove掉老版本


#148

谢谢,我自己解决了,这是混合几个版本又没装好cuda报的错。。然后还缺少库,最后我从conda里复制了一大堆dll进去解决了问题,现在已经可以正常跑了


#149

这个厉害


#150

安装时惊喜地遇到了问题:

jupyter-1.0.0- 100% |#######################################################################################################| Time: 0:00:00   4.63 MB/s
Traceback (most recent call last):
  File "/home/gaunthan/.conda/envs/gluon/bin/pip", line 4, in <module>
    import pip
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
    f(*args, **kwargs)
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
    declare_namespace(pkg)
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/home/gaunthan/.conda/envs/gluon/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues

还好,将2121行的代码改成orig_path = sorted(orig_path, key=position_in_sys_path)能避开pip无法正常运行的问题。只是之后需要手动装上requests和mxnet。

平台信息:

$ uname -r -m
4.15.6-300.fc27.x86_64 x86_64
$ conda --version
conda 4.3.30
$ anaconda --version
anaconda Command line client (version 1.6.5)

参考:https://github.com/tonybaloney/sphinxcontrib-confluencebuilder/issues/45


#151

我想请问下anaconda(python)用2还是3


#152

我在mac下用conda安装,conda env create -f environment.yml和前面的步骤都成功了,但是之后的source activate gluon出错,报错-bash: _conda_activate: command not found, 这个是什么原因?mac版本10.13.1


#153

conda执行conda env create -f environment.yml出错 关于qt安装出错导致整个无法安装下去

可以看到是在在所有包下载完毕后安装qt的过程中出错的 怎么解决呢?


#154

系统版本 ubuntu 16.04
python版本 python2.7
gcc 5.4.0
CUDA 8.0
cudnn 6.0.21

问题
源码编译,USE_CUDNN=1会报cannot find -lcudnn。
回退到1.1.0版本能正常编译,USE_CUDNN=0也能正常编译。


#155

我也遇到同样的问题,你最终解决了吗?


#156

我试了 pip install environment.yml, 还是说"Could not find a version that statisfies the requirement environment.yml(from versions: ) No matching distribution found for environment.yml"


#157

不应该是pip install,是
conda env create -f environment.yml

详细:
https://zh.gluon.ai/chapter_prerequisite/install.html


#158

我是先用的conda env create -f environment.yml,不成功,又试了pip install, 也不成功

错误和 110楼的一样,如下:

conda env update environment.yml
Using Anaconda API: https://api.anaconda.org
Fetching package metadata …
Solving package specifications: .
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting mxnet>=1.2.0b20180427
Could not find a version that satisfies the requirement mxnet>=1.2.0b20180427 (from versions: )
No matching distribution found for mxnet>=1.2.0b20180427


#159

我刚刚在一台干净的macOS上是可以的

Collecting mxnet>=1.2.0b20180427 (from -r /Users/gluon-tutorials-zh/condaenv.biwft9fu.requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/ab/6d/ea00f02aa1ff48832027838239d1d6eeaca58a6edc28837ef127f1996f1b/mxnet-1.2.0b20180512-cp36-cp36m-macosx_10_12_x86_64.whl (9.9MB)
100% |████████████████████████████████| 9.9MB 2.3MB/s

你用的是什么操作系统


#160

如果你把environment.yml中的

  • mxnet>=1.2.0b20180427

替换成更早一点的版本呢:


#161


利用pip install 的 gluoncv 0.2.0 遇到这个问题,求问怎么处理?


#162

我用的是Ubuntu14.04 32bit. 我试过老版本,一样的错误。


#163

@zhreshold 你看一下?


#164

你直接执行pip install mxnet --pre 会怎么样