当前位置:网站首页>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 .
边栏推荐
- Use of resttemplate and Eureka
- SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t
- ELS new box falls
- Three ways of creating indexes in MySQL
- OpenGL development with QT (II) drawing cube
- C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)
- PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
- C语言犄角旮旯的知识之形参、实参、main函数参数、数组或指针做函数参数等
- 围绕新市民金融聚焦差异化产品设计、智能技术提效及素养教育
- 【HCIP】MPLS 基础
猜你喜欢

瑞吉外卖项目实战Day01

Intel introduces you to visual recognition -- openvino

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

redis安装,集群部署与常见调优

【HCIP】MPLS 基础

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

嵌入式分享合集23

云原生应用综合练习上

Teach you a text to solve the problem of JS digital accuracy loss
![[hcip] experiment of republishing and routing strategy](/img/26/d62d3083796757d33c0a513f842176.png)
[hcip] experiment of republishing and routing strategy
随机推荐
JS事件简介
Django uses pymysql module to connect mysql database
Matplotlib Chinese question
ELS new box falls
数据库的decimal类型的数据,发现可以通过resultSet.getDouble去拿到这个数据,但是通过getObject却拿不到这个属性。
Digital currency of quantitative transactions - generate foot print factor data
ELS square movement
SQL injection of DVWA
跨模态对齐 20220728
Merkel Studio - harmonyos implementation list to do
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
Common functions and usage of numpy
[search] - DFS pruning and optimization
云原生应用综合练习下
BOM系列之window对象
Understand various paths
[hcip] experiment of republishing and routing strategy
560 和为 K 的子数组
PCL point cloud intensity image
ELMO,BERT和GPT简介