简体   繁体   English

拨轮包装安装失败

[英]Pip Wheel Package Installation Fail

I try to run pip wheel azure-mgmt=0.20.1 , but whenever I run it I get following pip wheel error, which is very clear: 我尝试运行pip wheel azure-mgmt=0.20.1 ,但是每当我运行它时,都会出现以下pip wheel错误,这非常清楚:

error: [Error 183] Cannot create a file when that file already exists: 'build\\\\bdist.win32\\\\wheel\\\\azure_mgmt-0.20.0.data\\\\..'

So my question is where or how I can find that path? 所以我的问题是在哪里或如何找到那条路? I want to delete that existing file. 我想删除该现有文件。 I have been searching my local computer, searched for default path in Google, but still didn't find any solution. 我一直在搜索本地计算机,在Google中搜索默认路径,但仍然找不到任何解决方案。

Also is it possible to tell pip wheel to output full log? 还可以告诉pip wheel输出完整日志吗? As you can see that full error path is not displayed. 如您所见,未显示完整的错误路径。 I'm using virtualenv. 我正在使用virtualenv。

We can see the description of virtual env at the official python guide : 我们可以在官方的python指南中看到virtual env的描述:

To help manage external package dependencies, Azure Git deployment supports the creation of virtual environments. 为了帮助管理外部程序包依赖性,Azure Git部署支持创建虚拟环境。

When Azure detects a requirements.txt in the root of the repository, it automatically creates a virtual environment named env. 当Azure在资源库的根目录中检测到requirements.txt时,它将自动创建一个名为env的虚拟环境。 This only occurs on the first deployment, or during any deployment after the selected Python runtime has changed. 这仅在第一次部署时发生,或者在选定的Python运行时已更改后的任何部署中发生。

You can directly modify the dependencies and versions of them in requirement.txt , then deploy your python app to Azure Web App via git, Azure will update the python packages automatically. 您可以直接修改的依赖关系和它们的版本requirement.txt ,然后通过git的部署Python应用程序天青Web应用程序,天青将自动更新Python包。 You can check the packages in the virtual env folder which path is env\\Lib\\site-packages in the root directory of your site. 您可以检查虚拟env文件夹中的软件包,该路径在env\\Lib\\site-packages的根目录中为env\\Lib\\site-packages You can login on the kudu console of your site to check your files of you site online, the URL should be: https://{your_site_name}.scm.azurewebsites.net/DebugConsole . 您可以在站点的kudu控制台上登录以在线检查站点的文件,URL应该是: https://{your_site_name}.scm.azurewebsites.net/DebugConsole

Additionally, according your description, it seems that you use the global python environment to run pip install command which may directly install packages in your global python environment. 此外,根据您的描述,您似乎使用了全局python环境来运行pip install命令,该命令可能会直接在全局python环境中安装软件包。 To install packages in your virtual env, you need to run the similar command env\\scripts\\pip install -r requirements.txt in your root directory of your application. 要在虚拟环境中安装软件包,需要在应用程序的根目录中运行类似的命令env\\scripts\\pip install -r requirements.txt Please refer to Web app development - Windows - command line for more information. 有关更多信息,请参考Web应用程序开发-Windows-命令行

have you tried uninstalling and reinstalling? 您是否尝试过卸载并重新安装?

I tried pip wheel azure-mgmt and that installed -0.20.1 for me. 我尝试了pip wheel azure-mgmt ,它为我安装了-0.20.1。

The directory for mine is /Users/me/wheelhouse, so you could look there. 我的目录是/ Users / me / wheelhouse,所以您可以在这里查看。 I found that in the initial log of the build. 我在构建的初始日志中发现了这一点。

@Amir, One option is that you could generate the requirement.txt file and remove your virtual environment if you used Visual studio to develop your application. @Amir,一种选择是,你可以生成requirement.txt文件,如果使用Visual Studio开发的应用程序中删除您的虚拟环境。 Then you can add a new virtual environment for your project and install all packages from requirement.txt file. 然后,你可以为你的项目中添加一个新的虚拟环境和安装所有的软件包requirement.txt文件。 Or after removed your virtual environment, you can try pip wheel azure-mgmt command. 或者,在删除虚拟环境后,您可以尝试使用pip wheel azure-mgmt命令。

And another option is that you can follow this similar issue: https://vilimpoc.org/blog/2014/01/18/time-robbing-python-errors/ The blogger modified the LOCALAPPDATA path to resolve this issue. 另一个选择是您可以遵循类似的问题: https : LOCALAPPDATA博客修改了LOCALAPPDATA路径以解决此问题。 Please try it. 请尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM