我想在Microsoft的Python角色中使用Numpy和Pandas。
我尝试将numpy和pandas添加到requirements.txt中,但这不起作用(使用pip安装numpy常常会导致问题,因此这是预料中的)。
我听从了这个建议并将numpy作为一个轮子从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载,并将文件放在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工作呢?
发布于 2015-12-08 06:45:42
根据您的描述,看起来您在Azure you上托管了您的python应用程序。如果您使用Visual作为IDE,我建议您可以遵循以下解决方案:
您可以尝试在Web角色包中将python虚拟环境设置为python运行时,并利用Visual,我们可以轻松地在python中配置和部署云服务。
1 .在您的Azure项目解决方案中,右键单击web角色包下的Python ,单击。

2,如果将虚拟env命名为env,VS将在web角色根目录中创建一个名为env的VE文件夹。将车轮文件numpy-1.9.3+mkl-cp34-none-win32.whl复制到env文件夹中。
3、配置requirements.txt,为了完全配置pandas和numpy的依赖关系,下面是我的requirements.txt看起来类似于azure包:
pandas
numpy-1.9.3+mkl-cp34-none-win32.whl
six
pytz4 .右键单击解决方案树中的虚拟env,单击Installfromrequirements.txt来安装所有包。

5,然后将其部署到Azure
通过我这边的这种方法,效果很好。如有任何问题,请随时通知我。
发布于 2016-10-25 18:53:24
在我的例子中,它是由驱动器C:是太满。您的PC中所有进程的所有临时文件都存储在驱动器C:中,所以当它满时您无法安装大型软件包。
发布于 2017-01-31 10:53:01
我已经完成了大约3天的工作,在调试了pip代码和其他部分之后,我的修补程序是:
iex "$env:PYPATH\Scripts\pip.exe install -b e:\approot\stuff -r requirements.txt“
注意-b。
由于某种原因,Windows/Python认为它在标准的临时目录c:\resources\app_id中已经没有空间了……(当有>200 was的容量时)
通过使用-b,它强制pip使用您自己的构建目录,该目录不会被填满。
太高兴了
https://stackoverflow.com/questions/34130951
复制相似问题