当前位置:网站首页>From Anaconda to tensorflow to jupyter, step on the pit and fill it all the way
From Anaconda to tensorflow to jupyter, step on the pit and fill it all the way
2022-07-25 13:56:00 【Fox's hat】
1. install anaconda Possible pit
Download address :https://repo.continuum.io/archive/index.html
I installed Anaconda3-5.2.0, To match python3.6. But then I found out that after the new virtual environment , You can customize what you need for installation python edition , therefore anaconda Version can be installed at will .
You need to add it to the environment variable during installation , I skip 了 vscode Installation , As a result, it won't open navigator, Has been installing Go around there , Don't complain .
Solution 1: Open as administrator . Find or turn around .
Solution 2:anaconda prompt Open as Administrator
conda --version
anaconda navigator
An error is as follows :
The error reported here is because we can't find vscode The version of , Need to find anaconda_api.py,edit with pycharm And so on. , You cannot double-click , Double click directly and make changes without saving . Need to be in anaconda_api.py Middle handlebar Cong 811 The line vscode Related codes to return The previous part is commented out , That's all right. .vscode After the problem is solved ,anaconda Finally, it can be opened .
2. Installing a virtual environment
Why virtual environment ? I use... Directly anaconda default root Is it not fragrant ?
I was lazy before and didn't install a new virtual environment , Directly in root Lower installation TensorFlow, Many dependent packages are found to be degraded or upgraded , The more secure, the more disorderly . This Zhihu answers the Lord to solve my confusion , The simplest example assumes that the framework needs to be installed A package , install A The prerequisite of the package is B Bag 2.1 Version and C Bag 1.2 All versions have , At this time, in your original system B The bag could be 3.2 edition , In order to pretend A The package needs to be downgraded , But the original in the system D The bag needs 3.2 Version of B package , therefore B The package has been downgraded , May lead to D The bag cannot be used . So we must have a new virtual environment , Dedicated to deep learning .
( original text :https://zhuanlan.zhihu.com/p/136268744)
stay anaconda prompt Open as administrator in ,
conda create --name energy-ai python=3.6
The speed of discovery is extremely slow , The error is also reported as follows :
It seems that the remote server has timed out transmitting information , So an extended time limit is added ,
conda config --set remote_read_timeout_secs 1000.0

This is a new mistake , Server connection problems abroad , So replace the image source :
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
conda create --name energy-ai python=3.6
this time sousou Of , It was installed soon .
activate energy-ai
3. install TensorFlow
The previous installation with the command line was very unsuccessful , This time I'm directly in navigator Of environment I found it directly TensorFlow, Click directly .
4.jupyter Installation and normal use
jupyter Is installed directly on the energy-ai One click installation under the interface . But there are problems in using , Has been submitted to the kernel error, Click runtime , Will jump to the next cell, But no error or result .
The analysis reason : Then used Anaconda Install multiple versions of python When , Or because of multiple uninstallations anaconda when , Lead to python Of kernel The kernel installation path is chaotic , bring Jupyter notebook Unavailable . I uninstall many times anaconda As a result of .
One 、 Start by opening Anaconda Prompt
Two 、 Input jupyter kernelspec list Check the installed kernel and location
Let's say mine is C:\Users\bonni\AppData\Roaming\jupyter\kernels\python3
3、 ... and 、 Enter the location where the kernel is installed , open kernel.jason, see python Whether the path file of the editor is the same as the installation path , If it is different, you can modify it ( Change it to python.exe In the directory )
All changed to something like this C:\Users\bonni\Anaconda3\envs\energy-ai\python.exe
, It's your anaconda Of the current virtual environment under the installation path python.exe Location path .
Link to the original text :https://blog.csdn.net/wewearef/article/details/118761042
边栏推荐
- "Digital security" alert NFT's seven Scams
- Azure Devops (XIV) use azure's private nuget warehouse
- Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
- @classmethod 装饰器
- Namespaces and libraries
- Concurrent tool set for concurrent programming
- Write an esp32 Watchdog with Arduino
- Okaleido生态核心权益OKA,尽在聚变Mining模式
- Stay on Alibaba cloud mqtt IOT platform
- Brush questions - Luogu -p1146 coin flip
猜你喜欢

【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster
![[force buckle] 645. Wrong set](/img/0a/143d8996cbae9921652c4d4fb31046.png)
[force buckle] 645. Wrong set

Brush questions - Luogu -p1150 Peter's smoke

Leetcode202 --- Happy number

Audio and video technology development weekly | 255

在线问题反馈模块实战(十三):实现多参数分页查询列表

G027-op-ins-rhel-04 RedHat openstack creates a customized qcow2 format image

What problems should SEOER pay attention to when baidu searches and attacks pirated websites?

Brush questions - Luogu -p1085 unhappy Jinjin

How to refactor embedded code?
随机推荐
Talk about your understanding of hashcode and equals methods?
刷题-洛谷-P1059 明明的随机数
Leetcode 205. isomorphic string (2022.07.24)
How to refactor embedded code?
Business visualization - make your flowchart'run'(3. Branch selection & cross language distributed operation node)
Arduino code of key state machine for realizing single, double click, long press and other functions with esp32 timed interrupt
Tensorflow2 installation quick pit avoidance summary
DNS resolution error during windows unbutu20 lts apt, WGet installation
【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster
Advantages of wireless relay acquisition instrument and wireless network for engineering monitoring
Alibaba mqtt IOT platform "cloud product circulation" practice - the two esp32 achieve remote interoperability through the IOT platform
[force buckle] 645. Wrong set
Business analysis report and data visualization report of CDA level1 knowledge point summary
NoSQL,关系型数据库,行列数据库对比、类比
Audio and video technology development weekly | 255
[learning record] plt.show() solution to flash back
Applet sharing function
手里有点钱可以投资哪些理财产品?
刷题-洛谷-P1151 子数整数
2022年下半年软考信息安全工程师如何备考?