当前位置:网站首页>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 .
边栏推荐
猜你喜欢

SQL question brushing: find the last of all employees who have been assigned departments_ Name and first_ Name and Dept_ no

HCIA配置实例(eNSP)
![[hcip] two mGRE networks are interconnected through OSPF (ENSP)](/img/fe/8bb51ac48f52d61e8d31af490300bb.png)
[hcip] two mGRE networks are interconnected through OSPF (ENSP)

Analyzing the function of human-computer interface module of runtime manager based on autoware

Basic label in body

【观察】三年跃居纯公有云SaaS第一,用友YonSuite的“飞轮效应”

地下水、土壤、地质、环境人看过来

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

Linux redis source code installation

Use of resttemplate and Eureka
随机推荐
[MySQL] historical cumulative de duplication of multiple indicators
T-sne降维
【Web技术】1395- Esbuild Bundler HMR
SiC功率半导体产业高峰论坛成功举办
采用QT进行OpenGL开发(二)绘制立方体
【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域
Error installing mysqlclient module on MAC system
Regular checksum time formatting
ELS square movement
Log4j dynamic loading configuration file
Introduction to Elmo, Bert and GPT
[hcip] MPLS Foundation
Flash reports an error: type object 'news' has no attribute' query 'the view name is duplicate with the model name
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
【HCIP】MPLS 基础
全面升级,你能想象的都在这————京东API接口
如何选择专业、安全、高性能的远程控制软件
过去10年的10起重大网络安全事件
560 和为 K 的子数组
拼多多众多 API 接口皆可使用