安装mxnet jupyter notebook过程中遇到的错误

enviroment.yml
文件内容:

name: gluon
dependencies:
- python>=3.6
- jupyter=1.0.0
- matplotlib=2.2.2
- pandas=0.23.2
- pip:
  - requests==2.18.4
  - mxnet-cu80

conda env create -f enviroment.yml

>>> impoet mxnet
  File "<stdin>", line 1
    impoet mxnet
               ^
SyntaxError: invalid syntax
>>> import mxnet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mxnet'
Could not install packages due to an EnvironmentError: [Errno 13] 权限不够: '/home/zp/miniconda3/lib/python3.6/site-packages/numpy'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(gluon) zp@titanlab:~$ sudo pip install mxnet-cu80
The directory '/home/zp/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/zp/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: mxnet-cu80 in /usr/local/lib/python2.7/dist-packages (0.11.0)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from mxnet-cu80) (1.11.0)
Requirement already satisfied: graphviz in /usr/local/lib/python2.7/dist-packages (from mxnet-cu80) (0.7.1)
opencv-python 3.3.0.10 has requirement numpy>=1.11.1, but you'll have numpy 1.11.0 which is incompatible.
tensorflow-tensorboard 0.4.0rc3 has requirement markdown>=2.6.8, but you'll have markdown 2.2.0 which is incompatible.
tensorflow-tensorboard 0.4.0rc3 has requirement numpy>=1.12.0, but you'll have numpy 1.11.0 which is incompatible.
The 'contents_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7f0eec082898> instance must be a type, but 'notedown.NotedownContentsManager' could not be imported

 The 'contents_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7f4aaa905898> instance must be a type, but '‘notedown.NotedownContentsManager‘' could not be imported

####解决方法在notebook配置文件(/home/zp/.jupyter/jupyter_notebook_config.py)中添加:
c.NotebookApp.contents_manager_class = ‘notedown.NotedownContentsManager’
注意符号

mxnet 显卡正常但是不能使用,是因为mxnet的GPU配置显卡弄好
src/ndarray/ndarray.cc:1292: GPU is not enabled
最终发现是显卡驱动的原因。虽然可以用nvidia-smi查看到显卡信息,驱动重新装了好几次,表面上没什么问题,也多次强制重新启动。后来用命令重启服务器,一切恢复正常。

ImportError: cannot import name 'ensure_dir_exists’

Traceback (most recent call last):
  File "/home/zp/.conda/envs/gluon/bin/jupyter-notebook", line 4, in <module>
    import notebook.notebookapp
  File "/home/zp/.conda/envs/gluon/lib/python3.6/site-packages/notebook/__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "/home/zp/.conda/envs/gluon/lib/python3.6/site-packages/notebook/nbextensions.py", line 27, in <module>
    from jupyter_core.utils import ensure_dir_exists
ImportError: cannot import name 'ensure_dir_exists'

pip install --upgrade jupyter

 File "/home/zp/software/miniconda3/envs/gluon/lib/python3.6/site-packages/mxnet/base.py", line 105, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
  File "/home/zp/software/miniconda3/envs/gluon/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libcudart.so.9.1: cannot open shared object file: No such file or directory

用下面的命令,问题解决。建立软连接。

		sudo ldconfig /usr/local/cuda-8.0/lib64
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值