当前位置:网站首页>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 .
边栏推荐
- Three ways of creating indexes in MySQL
- API stability guarantee of Prometheus
- JS judge whether array / object array 1 contains array / object array 2
- Read the recent trends of okaleido tiger and tap the value and potential behind it
- 梅克尔工作室——HarmonyOS实现列表待办
- [MySQL] historical cumulative de duplication of multiple indicators
- 【HCIP】重发布及路由策略的实验
- C语言犄角旮旯的知识之形参、实参、main函数参数、数组或指针做函数参数等
- Django reports an error using pymsql module django.db.utils.operationalerror
- [hcip] experiment of republishing and routing strategy
猜你喜欢
随机推荐
body中基本标签
什么是原码、反码和补码
Intel introduces you to visual recognition -- openvino
如何选择专业、安全、高性能的远程控制软件
【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域
Common functions and usage of numpy
We summarized the three recommendations for the use of Nacos and first published the Nacos 3.0 plan for the 4th anniversary of the open source of Nacos
BOM系列之window对象
JS事件简介
560 and K
Introduction to Elmo, Bert and GPT
Openpyxl library fill color
Analysys analysis: focus on users, improve the user experience of mobile banking, and help the growth of user value
Cross modal alignment 20220728
Cloud native application comprehensive exercise
[hcip] MPLS Foundation
Autoware reports an error: can't generate global path for start solution
[unity project practice] synthetic watermelon
关于df[‘某一列名’][序号]
ELS square movement









