What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-23 00:04:02
dictionary removing specific key
>>> # Python 3.6, and beyond >>> incomes = {'apple': 5600.00, 'orange': 3500.00, 'banana': 5000.00} >>> sorted_income = {k: incomes[k] for k in sorted(incomes)} >>> sorted_income {'apple': 5600.0, 'banana': 5000.0, 'ora... Add solution -
Python 2021-09-19 22:01:02
change the default python version mac
#install or update brew $ brew install pyenv #install $ pyenv install 3.7.3 #make default $ pyenv global 3.7.3 # and verify $ pyenv version 3.7.3 (set by /Users/mbbroberg/.pyenv/version) $ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n &n... Add solution -
Other 2021-09-18 18:22:04
valueerror: numpy.ndarray size changed, may indicate binary incompatibility. expected 88 from c header, got 80 from pyobject
I'm in Python 3.8.5. It sounds too simple to be real, but I had this same issue and all I did was reinstall numpy. Gone. pip uninstall numpy pip install numpy Add solution -
Other 2021-09-14 17:19:01
local variable 'distro_name' referenced before assignment
// Solution for Python 3.8, procedure for other version might be a little different. Edit the file: .../anaconda3/lib/python3.8/site-packages/anaconda_navigator/api/external_apps/vscode.py" Add "DISTRO_NAME = None" at line 159 in the func... Add solution -
Python 2021-09-13 14:16:02
command to install python3.6 on mac os
$ brew switch python 3.6.5_1 Add solution -
Python 2021-09-12 13:08:02
ModuleNotFoundError: No module named 'rospkg'
# `python-catkin-tools` is needed for catkin tool # `python3-dev` and `python3-catkin-pkg-modules` is needed to build cv_bridge # `python3-numpy` and `python3-yaml` is cv_bridge dependencies # `ros-melodic-cv-bridge` is needed to install a lot of cv_bridg... Add solution