Ubuntu16.04环境下Python开发环境配置——集成IDE工具Pycharm入门

1 新建工程

  • 创建名字为untitled(默认)的工程:
Ubuntu16.04环境下Python开发环境配置——集成IDE工具Pycharm入门_第1张图片
  • 修改python运行环境,配置anaconda管理的环境:

Ubuntu16.04环境下Python开发环境配置——集成IDE工具Pycharm入门_第2张图片

  • 遇到以下的报错:

Ubuntu16.04环境下Python开发环境配置——集成IDE工具Pycharm入门_第3张图片

    上面提示是conda版本太旧,建议更新一下conda版本到最新。(hint:因为conda是包管理工具,在处理环境依赖时建议确保conda一定要是最新的版本)。

    使用conda update -n base conda更新conda版本:

yuhuiliu@sinclab-desktop:~$ conda update -n base conda
Solving environment: done
## Package Plan ##
environment location: /home/yuhuiliu/anaconda3
added / updated specs:
- conda
The following packages will be downloaded:
---------------------------|-----------------
package | build
conda: 4.4.10-py36_0 defaults --> 4.5.2-py36_0 defaults
The following packages will be UPDATED:
conda-4.5.2 | py36_0 1.0 MB defaults
conda 4.5.2: ########################################################### | 100%
Verifying transaction: done
Proceed ([y]/n)? Y
Downloading and Extracting Packages
ERROR conda.core.link:_execute(481): An error occurred while uninstalling package 'defaults::conda-4.4.10-py36_0'.
Preparing transaction: doneExecuting transaction: failed
Rolling back transaction: done
PermissionError(13, 'Permission denied')
PermissionError(13, 'Permission denied')
Attempting to roll back.

      出现了PermissionError(13, 'Permission denied') 的权限问题,参见:https://stackoverflow.com/questions/49181799/conda-update-conda-permission-error,问题解决如下:

 
  
yuhuiliu@sinclab-desktop:~$ sudo chown -R yuhuiliu:yuhuiliu /home/yuhuiliu/anaconda3/
yuhuiliu@sinclab-desktop:~$ conda update -n base conda                          Solving environment: done
## Package Plan ##
  environment location: /home/yuhuiliu/anaconda3
  added / updated specs:
    conda: 4.4.10-py36_0 defaults --> 4.5.2-py36_0 defaults
    - conda
The following packages will be UPDATED:
Proceed ([y]/n)? Y
Executing transaction: done
Preparing transaction: done
Verifying transaction: done

     重新更新一下:

Ubuntu16.04环境下Python开发环境配置——集成IDE工具Pycharm入门_第4张图片


你可能感兴趣的:(Python开发工具,机器学习,Ubuntu)