我有Ubuntu 16.04服务器环境,并且正在尝试在其上安装CNTK。当我尝试在环境部分安装 pip install时,我收到以下错误。
我成功地跑了两步:
$ conda create --name cntk-py34 python = 3.4 numpy scipy h5py jupyter
$ activate cntk-py35
但是当我尝试安装cntk whl文件时出现错误:
$ pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.0.beta15.0-cp35-cp35m-linux_x86_64.whl
======错误==================
例外: Traceback(最近一次调用最后一次): 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/basecommand.py”,第215行,主要 status = self.run(options,args) 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/commands/install.py”,第335行,在运行中 wb.build(自动建立=真) 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/wheel.py”,第749行,在构建中 self.requirement_set.prepare_files(self.finder) 在prepare_files中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/req/req_set.py”,第380行 ignore_dependencies = self.ignore_dependencies)) 在_prepare_file中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/req/req_set.py”,第620行 session = self.session,hashes = hashes) 在unpack_url中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/download.py”,第821行 散列=散列 在unpack_http_url中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/download.py”,第659行 哈希) 在_download_http_url中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/download.py”,第853行 流=真, 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py”,第488行,获取 return self.request('GET',url,** kwargs) 请求文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/download.py”,第386行 return super(PipSession,self).request(method,url,* args,** kwargs) 请求文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py”,第475行 resp = self.send(prep,** send_kwargs) 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py”,第596行,发送 r = adapter.send(request,** kwargs) 文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py”,第37行,发送 cached_response = self.controller.cached_request(request) 在cached_request中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/controller.py”,第111行 resp = self.serializer.loads(request,cache_data) 在负载中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/serialize.py”,第114行 return getattr(self,“_ load_v {0}”。format(ver))(request,data) 在_loads_v2中输入文件“/home/ubuntu/.conda/envs/cntk-py35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/serialize.py”,第176行 cached = json.loads(zlib.decompress(data).decode(“utf8”)) 的MemoryError
任何想法???
提前致谢!
答案 0 :(得分:0)
在您的问题中,您提到了两个不同的Python版本(3.4和3.5)。此外,还需要获取Anaconda Environment激活。假设您已经满足OpenMPI依赖关系(参见https://github.com/Microsoft/CNTK/wiki/Setup-Linux-Python),您可以尝试以下方法之一:
# For a Python 3.4 based setup
conda create --name cntk-py34 python=3.4 numpy scipy h5py jupyter
source activate cntk-py34
pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.0rc1-cp34-cp34m-linux_x86_64.whl
# For a Python 3.5 based setup
conda create --name cntk-py35 python=3.5 numpy scipy h5py jupyter
source activate cntk-py35
pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.0rc1-cp35-cp35m-linux_x86_64.whl