[python 데이터분석] Keeping Anaconda Up To Date

Below is a question that gets asked so often that I decided it would be helpful to publish an answer explaining the various ways in which Anaconda can be kept up to date. The question was originally asked on StackOverflow.

I have Anaconda installed on my computer and I’d like to update it. In Navigator I can see that there are several individual packages that can be updated, but also an anaconda package that sometimes has a version number and sometimes says custom. How do I proceed?

The Answer

What 95% of People Actually Want

In most cases what you want to do when you say that you want to update Anaconda is to execute the command:

conda update --all

This will update all packages in the current environment to the latest version—with the small print being that it may use an older version of some packages in order to satisfy dependency constraints (often this won’t be necessary and when it is necessary the package plan solver will do its best to minimize the impact).

This needs to be executed from the command line, and the best way to get there is from Anaconda Navigator, then the “Environments” tab, then click on the triangle beside the root environment, selecting “Open Terminal.”

This operation will only update the one selected environment (in this case, the root environment). If you have other environments you’d like to update you can repeat the process above, but first click on the environment. When it is selected there is a triangular marker on the right (see image above, step 3). Or, from the command line, you can provide the environment name (-n envname) or path (-p /path/to/env). For example, to update your dspyr environment from the screenshot above:

conda update -n dspyr --all

Update Individual Packages

If you are only interested in updating an individual package then simply click on the blue arrow or blue version number in Navigator, e.g. for astroid or astropy in the screenshot above, and this will tag those packages for an upgrade. When you are done you need to click the “Apply” button.

Or from the command line:

conda update astroid astropy

Updating Just the Packages in the Standard Anaconda Distribution

If you don’t care about package versions and just want “the latest set of all packages in the standard Anaconda Distribution, so long as they work together,” then you should take a look at this gist.

Why Updating the Anaconda Package is Almost Always a Bad Idea

In most cases, updating the Anaconda package in the package list will have a surprising result—you may actually downgrade many packages (in fact, this is likely if it indicates the version as custom). The gist above provides details.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

Leverage conda Environments

Your root environment is probably not a good place to try and manage an exact set of packages—it is going to be a dynamic working space with new packages installed and packages randomly updated. If you need an exact set of packages, create a conda environment to hold them. Thanks to the conda package cache and the way file linking is used, doing this is typically fast and consumes very little additional disk space. For example:

conda create -n myspecialenv -c bioconda -c conda-forge python=3.5 pandas beautifulsoup seaborn nltk

The conda documentation has more details and examples.

pip, PyPI, and setuptools?

None of this is going to help with updating packages that have been installed from PyPI via pip, or any packages installed using python setup.py installconda list will give you some hints about the pip-based Python packages you have in an environment, but it won’t do anything special to update them.

Commercial Use of Anaconda or Anaconda Enterprise

It’s pretty much exactly the same story, with the exception that you may not be able to update the root environment if it was installed by someone else (say, to /opt/anaconda/latest). If you’re not able to update the environments you are using, you should be able to clone and then update:

conda create -n myenv --clone root
conda update -n myenv --all

Where to Go Next

If you have more questions about Anaconda then you can refer to our online documentation, or make use of our commercial (paid) or community (free) support channels. If you are using Anaconda in an enterprise setting, then I think you’ll be interested in learning about how Anaconda can help you and your colleagues with collaboration, security, governance, and provenance around your data science workflows.

 

[출처] https://www.anaconda.com/blog/keeping-anaconda-date

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
66 [Django] 장고 CORS 크로스 도메인 이슈 졸리운_곰 2023.12.17 504
65 [django] CORS(Cross Origin Resource Sharing) in Django 졸리운_곰 2023.12.17 421
64 [django] Forbidden (CSRF cookie not set.) 오류 해결하기 file 졸리운_곰 2023.12.17 346
63 [Django] Django 서버를 domain forwarding 시 : Django nginx Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN' 졸리운_곰 2023.12.17 404
62 [Django] Django SSLServer 설정 및 구동 방법 file 졸리운_곰 2023.12.16 288
61 [Django][Django restframework] Django REST framework 시작하기 file 졸리운_곰 2023.05.07 365
60 [Django] REST API 로그인 서버 만들기 (2) - DB 연동, 테스트 file 졸리운_곰 2023.05.07 803
59 [Django] REST API 로그인 서버 만들기 (1) - 코드 졸리운_곰 2023.05.07 430
58 [Django] user의 ip address 가지고 오기 졸리운_곰 2023.05.07 461
57 [Django] [Python_Django] You are trying to add a non-nullable field '필드명' to post without a default 해결 졸리운_곰 2023.05.07 325
56 [Django] [Python_Django] 관리자 계정에서 테이블 관리하기 file 졸리운_곰 2023.05.06 397
55 [Django] TIP - 장고 데이터베이스 여러개 사용하기 (Django multidatabase) file 졸리운_곰 2023.05.05 345
54 [Django] 장고 동작 flow에 대해 알아보자! file 졸리운_곰 2023.05.01 455
53 [python django] 내 이해를 도울 Django flow file 졸리운_곰 2023.05.01 502
52 [Django] 개발 Flow & 개발 환경 세팅 file 졸리운_곰 2023.05.01 386
51 [Django] 장고 명령어 기초 정리 졸리운_곰 2023.05.01 439
50 [python django] 장고 자주 쓰는 manage.py 명령 졸리운_곰 2023.05.01 610
49 [python][Django] Python Package Trends: Visualize Package Download Stats in Django file 졸리운_곰 2023.03.18 368
48 [python][Django] Django Workflow and Architecture 장고 개발 워크플로우 및 구조 file 졸리운_곰 2023.03.12 338
47 [python][Django] DRF(장고 rest framework)와 REST API서버 개발 file 졸리운_곰 2023.03.12 341
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED