程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Create your own python virtual environment on a public Linux server

編輯:Python

Create your own python virtual environment on a public Linux server

  • 1. Understand the server and GPU used
  • Second, install Anaconda and Pycharm
  • Three, build your own environment
  • 4. Use your own environment
  • Five, use conda to install GPU version TensorFlow-GPU on linux system
  • 6. Reference links

1. Understand the server and GPU used

cat /proc/version

lspci | grep -i nvidia

nvidia-smi

Check the existing state to see if there is any program to run again.

Second, install Anaconda and Pycharm

This server has already installed and configured these contents, and then directly start to build your own environment.

Third, build your own environment

1. First enter source ~/.bashrc to update environment variables, the front becomes (base)

source ~/.bashrc

2. Create your own virtual environment, the instructions are as follows

conda create -n gyyenv python=3.8.5

Then enter y, confirm, and get the following picture after completion

Fourth, use your own environment

1. Enter the environment created by yourself and enter the command

conda activate gyyenv

2. Return to the eight base environment and enter the command

conda deactivate

3. Check the environment in the directory and enter the command

conda env list


4. Delete the environment and enter the command, in which name is changedinto the name of the environment you want to delete.

conda env remove -n name

Five, use conda to install GPU version TensorFlow-GPU on linux system

1. Enter the virtual environment cond activate gyyenv created by yourself, you can check the tensorflow version installation first, enter the command conda search tensorflow-gpu , the diagram is as follows:

2. By command conda list See what's installed.

3. Through the command conda install tensorflow-gpu==2.2.0


4. Check if tensorflow is installed successfully.


The last True indicates that the installation was successful and exit your virtual environment!

6. Reference links

  1. Build your own python environment on the server
  2. The first step of scientific research: Create a python virtual environment on a Linux server
  3. Use conda to install GPU version TensorFlow-GPU on linux system (detailed steps)

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved