Python anaconda conda issue: updating anaconda package impossible because processes are running

白昼怎懂夜的黑 提交于 2019-12-06 22:48:10

问题


I have an issue with updating anaconda's packages with conda. when I make a conda update --all there is an issue which says to me:

Error: Unable to remove files for package: cryptography
Please close all processes running code from cryptography and try again.

however, none process are running, I have just the cmd window open. Same story when I want update dateutile for instance. It is like if conda uses some package and then I cannot update them? Somebody knows a method to close or remove those packages in order to reinstall them?

For information:

C:\Anaconda3\Scripts>conda info -a
Current conda install:
platform : win-64
conda version : 3.11.0
conda-build version : 1.11.0
python version : 3.4.3.final.0
requests version : 2.6.2
root environment : C:\Anaconda3 (writable)
default environment : C:\Anaconda3
envs directories : C:\Anaconda3\envs
package cache : C:\Anaconda3\pkgs
channel URLs : https://conda.binstar.org/juanlu001/win-64/
https://conda.binstar.org/juanlu001/noarch/
https://repo.continuum.io/pkgs/free/win-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/win-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : C:\Users\maxime.condarc
is foreign system : False

回答1:


This situation will be improved in the next version of conda, but for now, you can use conda install -f cryptography to force conda to update cryptography.




回答2:


The reason conda fails to update this packages is because when you call conda install or conda update in the default environment it connects to internet to get latest versions. And to do this conda uses cryptography library from the default environment and therefore it locks this file:

<Anaconda_folder_path>/Lib/site-packages/cryptography-0.8.1-py2.7-win-amd64.egg/cryptography/_Cryptography_cffi_f3e4673fx399b1113.pyd

So to overcome this particular problem you could install the latest cryptography package in offline mode thus avoiding conda locking that file.

If you have tried and failed to update the package - it has already been downloaded and its path should be: <Anaconda_folder_path>/pkgs/cryptography-0.8.2-py27_0.tar.bz2 (If not you might need to manually download it).

Copy this file to any other location and then isntall the package in offline mode:

conda install <path_to_new_location>cryptography-0.8.2-py27_0.tar.bz2

This has fixed the problem for me.



来源:https://stackoverflow.com/questions/29949087/python-anaconda-conda-issue-updating-anaconda-package-impossible-because-proces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!