Python作为非管理员?

时间:2018-05-02 01:49:15

标签: python windows administrator

我试图在Windows 10上用Tensorflow和Keras将Anaconda打包在我们的实验室环境中,实验室计算机没有管理员访问权限,也没有学生出于安全原因。 问题几行代码测试以确定安装是否正常工作仅在以管理员身份启动python时起作用:

>>> import keras
c:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 ==
np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.

以非管理员帐户身份运行时:

>>> import keras
Traceback (most recent call last):
 File "c:\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: dynamic module does not define module export function (PyInit_multiarray)
Traceback (most recent call last):


File "<stdin>", line 1, in <module>

File "c:\Anaconda3\lib\site-packages\keras\__init__.py", line 3, in <module> from . import utils

File "c:\Anaconda3\lib\site-packages\keras\utils\__init__.py", line 2, in <module> from . import np_utils File "c:\Anaconda3\lib\site-packages\keras\utils\np_utils.py", line 6, in <module> import numpy as np File "c:\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module> from . import add_newdocs File "c:\Anaconda3\lib\site-packages\numpy\add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "c:\Anaconda3\lib\site-packages\numpy\lib\__init__.py", line 8, in <module> from .type_check import * File "c:\Anaconda3\lib\site-packages\numpy\lib\type_check.py", line 11, in <module> import numpy.core.numeric as _nx File "c:\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 26, in <module> raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try git clean -xdf (removes all files not under version control). Otherwise reinstall numpy.

Original error was: dynamic module does not define module export function (PyInit_multiarray)

0 个答案:

没有答案