Python
LF-DevJourney
这个作者很懒,什么都没留下…
展开
-
ModuleNotFoundError: No module named ‘pkg_resources‘
Fix Python ModuleNotFoundError: No module named 'pkg_resources'原创 2024-01-22 21:15:00 · 1453 阅读 · 1 评论 -
SSLError(SSLError(1, ‘[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)‘))
SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))原创 2024-01-19 21:00:00 · 1089 阅读 · 0 评论 -
使用pytorch时报错:AttributeError: module ‘torchvision.transforms‘ has no attribute ‘Scale‘
使用pytorch时报错:AttributeError: module ‘torchvision.transforms‘ has no attribute ‘Scale‘, 问题分析与应对方法。原创 2024-01-17 11:50:56 · 746 阅读 · 0 评论 -
Colab 谷歌免费的云端Python编程环境初体验
Google Colab是一个强大且免费的云端Python编程环境,为学生、研究人员和开发者提供了一个便捷的平台来开展数据科学、机器学习和深度学习项目原创 2024-01-13 15:50:15 · 513 阅读 · 1 评论 -
str(c.version) for c in all_candidates SyntaxError: invalid syntax
pip --versionTraceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==10.0.0b2', 'console_scripts', 'pip')() File "/usr/lib/python2.6/site-pack...原创 2018-06-30 07:00:13 · 2950 阅读 · 0 评论 -
run jupyter notebook in pycharm
install notebook withsudo python3 -m pip install jupyterIn pycharm file > new...>Jupyter Notebook click on the Run Jupyter Notebooklink(this will show when you run your code) if your meet ...原创 2018-06-24 23:20:54 · 517 阅读 · 0 评论 -
ubuntu 安装破解 pycharm
download from https://www.jetbrains.com/zh/pycharm/download/download-thanks.htmlsudo tar xfz pycharm-*.tar.gz -C /opt/pycharm/opt/pycharm/bin/pycharm.shuse register code to register pycharm. You n...原创 2018-06-24 22:17:33 · 1017 阅读 · 0 评论 -
ubuntu16.04.1 ImportError: No module named '_tkinter'
use apt not pip to install python3-tksudo apt-get install python3-tk原创 2018-06-24 22:00:43 · 1243 阅读 · 0 评论 -
pip cannot import name 'main'
pip3Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import mainImportError: cannot import name 'main'refer github to fix it with: hash -d pip ...原创 2018-06-24 20:06:19 · 351 阅读 · 0 评论 -
NameError: name 'unicode' is not defined
There is no such name in Python 3, no. You are trying to run Python 2 code in Python 3. In Python 3, unicode has been renamed to str.原创 2018-06-14 20:45:55 · 55038 阅读 · 2 评论 -
怎么保存交互式Python会话(save-interactive-python-session-history)
有时候当我们使用Python终端交互执行代码时,需要保存当前的会话,或者需要保存已经输入的代码。IPython:`%save [options] filename n1-n2 n3-n4 … n5 .. n6 …`Pythonimport readlinereadline.write_history_file('/home/ahj/history')参考 How to sa...原创 2018-05-21 18:24:24 · 1521 阅读 · 0 评论