【发布时间】:2015-12-07 10:07:40
【问题描述】:
我想在 Microsoft Azure 上的 Python Web 角色中使用 Numpy 和 Pandas。
我尝试将numpy 和pandas 添加到requirements.txt,但这不起作用(使用pip 安装numpy 经常会导致问题,所以这是意料之中的)。
I followed this advice 并从http://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载 numpy 作为轮子并将文件放在 web 角色的根目录中。现在requirements.txt 看起来像这样:
azure>=0.8.0
azure-storage-logging
requests_futures
numpy-1.9.3+mkl-cp34-none-win32.whl
pandas
我远程进入虚拟机,发现C:\Resources\Directory\7044b9f2b424470aa191d9c178d06399.WorkerRole1.DiagnosticStore\LogFiles\ConfigureCloudService中有一些日志:
Storing debug log for failure in D:\Windows\system32\config\systemprofile\pip\pip.log
pip 1.5.6 from D:\Python34\lib\site-packages (python 3.4)
Unpacking e:\approot\numpy-1.9.3+mkl-cp34-none-win32.whl
Cleaning up...
Exception:
Traceback (most recent call last):
File "D:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "D:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "D:\Python34\lib\site-packages\pip\req.py", line 1197, in prepare_files
do_download,
File "D:\Python34\lib\site-packages\pip\req.py", line 1364, in unpack_url
unpack_file_url(link, location, download_dir)
File "D:\Python34\lib\site-packages\pip\download.py", line 640, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "D:\Python34\lib\site-packages\pip\util.py", line 621, in unpack_file
unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl')))
File "D:\Python34\lib\site-packages\pip\util.py", line 510, in unzip_file
fp.write(data)
OSError: [Errno 28] No space left on device
Storing debug log for failure in D:\Windows\system32\config\systemprofile\pip\pip.log
如何让 Numpy 工作?
【问题讨论】:
-
您的
D:驱动器空间不足 -
很明显,但这是由 Microsoft Azure 管理的虚拟机。我尝试将我的计划从超小型升级到中型,但这似乎只会增加内存大小,而不是磁盘大小。
-
你必须释放一些空间。尝试删除一些临时目录
-
怎么会空间不足?我还不能执行任何代码,我唯一做的就是上传我的包,它由一些 python 代码和 numpy 轮组成。 Windows 资源管理器告诉我
D:驱动器有 31.9 GB 中的 21.3 个可用空间。
标签: python azure numpy pip azure-web-roles