Pycharm
使用Anaconda3环境,长时间connecting-to-console
问题描述:
解决方案:
- 打开Anaconda P rompt
- 输入
echo %PATH%,获得PATH value - 在PyCharm中,
files -> Settings -> Build, Execution, Deployment -> Console -> Python Console -> 点击Environment variables的文件夹符号 - 点击+号,增加新的
Environment Variable;name中输入PATH,value中复制输入前边通过echo %PATH%的结果 - 点击OK,然后点击
apply,完成
问题总结:Anaconda3完整路径应当包含在计算机的环境变量中,如果没有应当写在pycharm的
Environment variables中。Reference: http://tieba.baidu.com/p/6035881399
pycharm中配置jupyter-notebook时,ernel-not-found-pycharm-6f7ad1c1
- 报错:Error with connection to Jupyter: server responded with 501 on POST http://localhost:8888/api/sessions HTTP/1.1. 201 was expected.
- 打开设置中的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
13Collecting 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目录,重新创建虚拟环境。
- 将Anaconda的完整目录添加至
Clion
Clion 使用MinGW编译器时,sh.exe报错
- 报错:
1
2clion 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 -> CMake中CMake Options添加参数-DCMAKE_SH="CMAKE_SH-NOTFOUND"

