I am a beginner in python and I am using an older version of anaconda which has the 3.5.2 version of python, because I would like to use tensorflow with it. I have some outdated packages that I would like to update with "conda update all". Is there a way to do this without updating python from 3.5 to 3.6, which is incompatible with tensorflow?
conda update --all --dry-run 2>/dev/null |
grep -Fe '-->' |
cut -d' ' -f3 |
grep -ve 'python' |
xargs conda update
Command
conda update --all --dry-run
Result
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: //anaconda3/envs/general
The following packages will be UPDATED:
astroid 2.3.1-py37_0 --> 2.3.2-py37_0
ca-certificates 2019.8.28-0 --> 2019.10.16-0
openssl 1.0.2t-h1de35cc_1 --> 1.1.1d-h1de35cc_3
pip 19.2.3-py37_0 --> 19.3.1-py37_0
pylint 2.4.2-py37_0 --> 2.4.3-py37_0
python 3.7.0-hc167b69_0 --> 3.7.4-h359304d_1
sqlite 3.30.0-ha441bb4_0 --> 3.30.1-ha441bb4_0
DryRunExit: Dry run. Exiting.
Command
conda update --all --dry-run 2>/dev/null
Result
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: //anaconda3/envs/general
The following packages will be UPDATED:
astroid 2.3.1-py37_0 --> 2.3.2-py37_0
ca-certificates 2019.8.28-0 --> 2019.10.16-0
openssl 1.0.2t-h1de35cc_1 --> 1.1.1d-h1de35cc_3
pip 19.2.3-py37_0 --> 19.3.1-py37_0
pylint 2.4.2-py37_0 --> 2.4.3-py37_0
python 3.7.0-hc167b69_0 --> 3.7.4-h359304d_1
sqlite 3.30.0-ha441bb4_0 --> 3.30.1-ha441bb4_0
Command
conda update --all --dry-run 2>/dev/null |
grep -Fe '-->'
Result
astroid 2.3.1-py37_0 --> 2.3.2-py37_0
ca-certificates 2019.8.28-0 --> 2019.10.16-0
openssl 1.0.2t-h1de35cc_1 --> 1.1.1d-h1de35cc_3
pip 19.2.3-py37_0 --> 19.3.1-py37_0
pylint 2.4.2-py37_0 --> 2.4.3-py37_0
python 3.7.0-hc167b69_0 --> 3.7.4-h359304d_1
sqlite 3.30.0-ha441bb4_0 --> 3.30.1-ha441bb4_0
Command
conda update --all --dry-run 2>/dev/null |
grep -Fe '-->' |
cut -d' ' -f3
Note: Since there are 2 spaces in front of each package name, the package name is the 3rd field of the line. This leads to the argument -f3
.
Result
astroid
ca-certificates
openssl
pip
pylint
python
sqlite
Command
conda update --all --dry-run 2>/dev/null |
grep -Fe '-->' |
cut -d' ' -f3 |
grep -ve 'python'
Result
astroid
ca-certificates
openssl
pip
pylint
sqlite
Command
conda update --all --dry-run 2>/dev/null |
grep -Fe '-->' |
cut -d' ' -f3 |
grep -ve 'python' |
xargs conda update
You can either update them all manually conda update yourpackage
...or you could update them all conda update --all
, and then downgrade python again with conda install python=3.5.2
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With