当前位置:网站首页>Anaconda environment installation problem
Anaconda environment installation problem
2022-07-29 01:41:00 【wweweiweiweiwei】
Anaconda Environmental installation issues
Recently, I am learning reinforcement learning , Of course, it uses python 了 , Don't bother the first few guys who just started running didn't use tensorflow Your code is ok , There is nothing wrong with reporting , The environment installation is also normal .
But learn DQN It's different from the beginning , install tensorflow There are always problems , Here are my problems and solutions , Draw lessons from .
1 conda and pip
conda and pip Can be used to download third-party libraries , such as pip install tensorflow and conda install tensorflow, But if you use Anaconda Manage resources , Then I recommend you use conda install tensorflow, And use it first activate xxx Enter your environment , And then use conda install tensorflow Install the third-party package .
Anaconda Have strong environmental management ability , It can be configured with different python route , And manage third-party packages for each path , Like the path 1 Of python The version is 3.5, It installs numpy、pandas Two bags ; route 2 Of python The version is also 3.5, It only installs tensorflow package , All this comes from Anaconda Management of .
that pip and conda What's the difference ? This is my understanding :
Under normal circumstances ( For example, I ) One will be installed first python Version or multiple reinstallations Anaconda( There is no need to install python, because Anaconda You can also install different versions python). So using pip Install third-party packages such as pip install tensorflow, Its installation position is python Under the path instead of Anaconda The next path , If you use conda install tensorflow, Then the installation path is Anaconda Under the path , This makes it easy to manage , It is also convenient to run different code in different packages .
Put a picture to show :

Remember this path , One version is python3.5.x, One is python3.6.13, Then, for example, you need to python3.6.13 Install packages in, such as pytz. Enter the first python3-6-13, Install again , Specific commands :
activate python3-6-13
conda install pytz

Then here is python The path of , use pip If installed, the high probability may be here ;

I will find that I have many bags here , But it's all because I didn't know at the beginning pip and conda The difference leads to both pip Installed , And then in pycharm When running in, it uses Anaconda The environment , You will find that Mingming I pip install tensorflow 了 , Why can't I find it tensorflow The fault of .
2 Anaconda Environment transplantation
But I don't know why I recently used Anaconda Install third-party libraries, such as conda install xxx It didn't work , The specific reason has not been found , That's how I solved it , My old computer installed Anaconda There is no problem installing any libraries , So I put the whole old computer Anaconda3 The folder is copied to the new computer , And then in pycharm Use in Anconda I used the old computer when I was Anaconda Environmental Science , It's also possible .

In this picture Anaconda3 It was installed on the new computer Anaconda Environmental Science , and Anaconda The folder is copied from the old computer , It is feasible. , I tested. , You just need to pycharm When configuring the compiler in Anaconda The file corresponding to the folder is ok .
3 Qt Report errors
Old computer copy Anaconda There is one after the file that needs to be modified , Namely Anaconda In the catalog qt.conf file .

The content is like this , To change the starting path , Otherwise, when you use python Make drawings, such as matplotlib mapping , Will report a mistake ;

It's because the path hasn't been changed , Change to corresponding Anaconda Just go down the path .
边栏推荐
- J9数字论:什么因素决定NFT的价值?
- [hcip] experiment of republishing and routing strategy
- Cross modal alignment 20220728
- RHCE command practice (I)
- Flask project construction 2
- PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
- J9 number theory: what factors determine the value of NFT?
- 了解各种路径
- Openpyxl library fill color
- Log4j dynamic loading configuration file
猜你喜欢

2022年最火的十大测试工具,你掌握了几个

Flink SQL Hudi actual combat

C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)

Flash reports an error: type object 'news' has no attribute' query 'the view name is duplicate with the model name

Platofarm community ecological gospel, users can get premium income with elephant swap

How many of the top ten test tools in 2022 do you master

Basic label in body
![[search] - DFS pruning and optimization](/img/d4/7c2fec02f5a6bcfa2d5e204398af01.png)
[search] - DFS pruning and optimization

Openpyxl library fill color

Cloud native application comprehensive exercise
随机推荐
SQL question brushing: find the last of all employees_ Name and first_ Name and corresponding department number Dept_ no
[hcip] two mGRE networks are interconnected through OSPF (ENSP)
云原生应用综合练习上
Recommended Spanish translation of Beijing passport
关于df[‘某一列名’][序号]
全面升级,淘宝/天猫api接口大全
[leetcode sliding window problem]
redis安装,集群部署与常见调优
Teach you a text to solve the problem of JS digital accuracy loss
新生代公链再攻「不可能三角」
Timer of BOM series
vm options、program arguments、environment property
mysql的执行顺序
560 and K
ELS square movement
Flash reports an error: type object 'news' has no attribute' query 'the view name is duplicate with the model name
C语言犄角旮旯的知识之形参、实参、main函数参数、数组或指针做函数参数等
Cloud native application comprehensive exercise
易观分析:以用户为中心,提升手机银行用户体验,助力用户价值增长
Lombook User Guide