TensorFlow macOS
open new project,选择interpreter:
/Users/jingyuli/miniconda3/envs/tf/bin/python3.5
安装新的api:
- conda-env list
- source activate tf
- pip install gensim
- pip install jieba
-------
ImportError: No module named 'tensorflow.keras'
tensorflow 1.8 不能用tensorflow.keras包,升级到2.0
pip install --upgrade --ignore-installed tensorflow
tensorflow之后import提示numpy安装有问题
先卸载numpy: pip uninstall numpy
再卸载numpy,直到卸载到提示信息显示,此时完全已经没有numpy了为止
下载numpy:pip install numpy
又报错 ImportError: cannot import name 'abs'
网上搜索是因为和protobuf版本不兼容造成的,因此需要卸载重新安装,也有说是tensorflow-gpu版本不匹配
pip install --ignore-installed --upgrade --ignore-installed tensorflow-gpu
又出现其他报错
搞崩了 (不要乱升级 不然就是重新卸了)
conda remove -n tf --all conda create -n tensorflow python=3.7
source activate tensorflow
conda install tensorflow=1.14.0
可以了。。。
(所以现在是)
-------------
2020年11月
tensorflow 环境
安装xgboost:conda install -c anaconda py-xgboost
安装jieba:pip可以 conda不行
安装gensim: pip install gensim
安装pandas和scikit-learn
pip install matplotlib
pip install nltk
截止现在3个环境
base-pytorch
tensorflow (含有keras)
theano
keras安装要注意:
新虚拟环境直接安装conda install keras 不可以,import的时候会报错。要先tensorflow
最后还是在tensorflow环境里 conda install -c conda-forge keras
版本2.3.1
-------------