IDE-Pycharm/Clion 配置问题记录

IDE-Pycharm/Clion 配置问题记录

记录使用各期间遇到的配置问题及解决方法,又是一个踩坑和犯蠢笔记

Pycharm

使用Anaconda3环境,长时间connecting-to-console

  • 问题描述:

  • 解决方案:

    • 打开Anaconda P rompt
    • 输入echo %PATH%,获得PATH value
    • 在PyCharm中, files -> Settings -> Build, Execution, Deployment -> Console -> Python Console -> 点击Environment variables的文件夹符号
    • 点击+号,增加新的Environment Variablename中输入PATHvalue中复制输入前边通过echo %PATH%的结果
    • 点击OK,然后点击apply,完成
  • 问题总结:Anaconda3完整路径应当包含在计算机的环境变量中,如果没有应当写在pycharm的Environment variables中。

    Reference: http://tieba.baidu.com/p/6035881399

pycharm中配置jupyter-notebook时,ernel-not-found-pycharm-6f7ad1c1

  • 问题描述:
  • 解决方案:
    • 打开设置中的Python Console,发现Environment variables中没有之前写入的路径 -> 教训一,设置针对了当前的project,要想针对所有project,应当点击:Other Settings -> Settings for New Projects,重新写入Anaconda3路径,重启
    • 此时,上述问题解决,出现新的问题,核心信息:Kernel not found: pycharm-6f7ad1c1
    • 详细截图:
    • 问题原因是,此jupyter notebook创建于kenerl没有设置为Anaconda3中的jupyter notebook的时候,所以kernel指向pycharm-6f7ad1c1
    • 删掉此.ipynb文件,重新建立即可

    使用Anaconda3环境,安装新模块时报错,ssl模块不可用

    • 问题描述:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      Collecting googletrans
      Could not fetch URL https://pypi.org/simple/googletrans/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/googletrans/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
      Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

      pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
      Could not find a version that satisfies the requirement googletrans (from versions: )
      No matching distribution found for googletrans
      pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    • 解决方案:
      • 将Anaconda的完整目录添加至系统设置 -> 环境变量 -> 用户变量PATH中。
      • C:\Anaconda3;C:\Anaconda3\Scripts;C:\Anaconda3\Library\bin
      • 多数情况是C:\Anaconda3\Library\bin缺失,导致创建虚拟环境时ssl模块缺失。
      • 添加路径之后,删除venv目录,重新创建虚拟环境。

        Reference: https://www.cnblogs.com/lovesKey/p/10887964.html

    Clion

    Clion 使用MinGW编译器时,sh.exe报错

    • 报错:
      1
      2
      clion sh.exe was found in your PATH, here: C:\Users\bobobo\scoop\apps\cmder-full\current\vendor\git-for-windows\bin\sh.exe
      For MinGW make to work correctly sh.exe must NOT be in your path.
    • 原因:装了cmder自带的git工具,因此会有git的的shell工具sh.exe,这会导致CMake报错
    • 解决方法:Setting -> Build, Execution, Deployment -> CMakeCMake Options 添加参数 -DCMAKE_SH="CMAKE_SH-NOTFOUND"
  • #

    评论

    Your browser is out-of-date!

    Update your browser to view this website correctly. Update my browser now

    ×