- Deep Learning Quick Reference
- Mike Bernico
- 330字
- 2021-06-24 18:40:07
Installing Python
We will be using virtualenv to create an isolated Python virtual environment. While this isn't strictly necessary, it's an excellent practice. By doing so, we will keep all our Python libraries for this project in a separate isolated environment that won't interfere with the system Python installation. Additionally, virtualenv environments will make it easier to package and deploy our deep neural networks later on.
Let's start by installing Python, pip, and virtualenv, using the aptitude package manager in Ubuntu. The following is the code:
sudo apt-get install python3-pip python3-dev python-virtualenv
Now we can create a virtual environment for our work. We will be keeping all our virtual environment files in a folder called ~/deep-learn. You are free to choose any name you wish for this virtual environment. The following code shows how to create a virtual environment:
virtualenv --no-site-packages -p python3 ~/deep-learn
Now that the virtual environment has been created, you can activate it as follows:
$source ~/deep-learn/bin/activate
(deep-learn)$ # notice the shell changes to indicate the virtualenv
Now that we've configured our virtual environment, we can add Python packages as required within it. To start, let's make sure we have the latest version of pip, the Python package manager:
easy_install -U pip
Lastly, I recommend installing IPython, which is an interactive Python shell that makes development much easier.
pip install ipython
And that's it. Now we're ready to install TensorFlow and Keras.
- 計(jì)算機(jī)圖形學(xué)
- 模型制作
- 大數(shù)據(jù)處理平臺(tái)
- 運(yùn)動(dòng)控制系統(tǒng)
- Mastering Geospatial Analysis with Python
- 筆記本電腦維修之電路分析基礎(chǔ)
- 手把手教你學(xué)Photoshop CS3
- Hands-On Business Intelligence with Qlik Sense
- R Statistics Cookbook
- 當(dāng)產(chǎn)品經(jīng)理遇到人工智能
- 這樣用Word!
- 商務(wù)智能
- R:Predictive Analysis
- 局域網(wǎng)組建與管理技術(shù)詳解
- 數(shù)字孿生技術(shù)與工程實(shí)踐:模型+數(shù)據(jù)驅(qū)動(dòng)的智能系統(tǒng)