首页 > 编程知识 正文

anaconda虚拟环境安装jieba,conda虚拟环境安装d盘

时间:2023-05-06 08:17:20 阅读:251677 作者:660

首先要安装virtualenv $ sudo apt-get install python-pip python-dev python-virtualenv 创建虚拟环境(如果使用默认的python版本则无需-p命令,如果要用指定的python版本,则使用-p命令来指定;我们假定创建的虚拟环境为tensorflow,即targetDirectory为tensorflow) $ virtualenv -p /usr/搞怪的蛋挞/期望使用的python版本 targetDirectory 激活虚拟环境 $ source ~/tensorflow/搞怪的蛋挞/activate 激活之后的虚拟环境变为 (tensorflow)$ 在激活的虚拟环境中安装TensorFlow (tensorflow)$ pip install --upgrade tensorflow # for Python 2.7 (tensorflow)$ pip3 install --upgrade tensorflow # for Python 3.n (tensorflow)$ pip install --upgrade tensorflow-gpu # for Python 2.7 and GPU (tensorflow)$ pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPU 如果上面的命令执行之后安装失败,则说明pip版本太低,无法通过https来下载,可以升级pip版本 (tensorflow)$ pip install --upgrade TF_PYTHON_URL # Python 2.7 (tensorflow)$ pip3 install --upgrade TF_PYTHON_URL # Python 3.N

如果升级失败,依然无法安装TF的话,则直接执行下面的命令,通常都可以安装成功

Python2.7(CPU/GPU)

(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl (tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp27-none-linux_x86_64.whl

Python3.4(CPU/GPU)

(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp34-cp34m-linux_x86_64.whl(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp34-cp34m-linux_x86_64.whl

Python3.5(CPU/GPU)

(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp35-cp35m-linux_x86_64.whl(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-linux_x86_64.whl

Python3.6(CPU/GPU)

(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp36-cp36m-linux_x86_64.whl(tensorflow)$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp36-cp36m-linux_x86_64.whl

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。