简体   繁体   中英

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:

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.

Also is it possible to tell pip wheel to output full log? As you can see that full error path is not displayed. I'm using virtualenv.

We can see the description of virtual env at the official python guide :

To help manage external package dependencies, Azure Git deployment supports the creation of virtual environments.

When Azure detects a requirements.txt in the root of the repository, it automatically creates a virtual environment named env. This only occurs on the first deployment, or during any deployment after the selected Python runtime has changed.

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. You can check the packages in the virtual env folder which path is env\\Lib\\site-packages in the root directory of your site. 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 .

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. 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. Please refer to Web app development - Windows - command line for more information.

have you tried uninstalling and reinstalling?

I tried pip wheel azure-mgmt and that installed -0.20.1 for me.

The directory for mine is /Users/me/wheelhouse, so you could look there. 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. Then you can add a new virtual environment for your project and install all packages from requirement.txt file. Or after removed your virtual environment, you can try pip wheel azure-mgmt command.

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. Please try it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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