Hot answers tagged

41 votes
Accepted

What does "precompile standard library" option mean in python installation?

When you import a python library and it doesn't have a corresponding .pyc file (or it's out of date compared to the source), python will "compile" new bytecode. It appears that this option simply does ...
25 votes
Accepted

How do I install vim on OSX with Python 3 support?

The following works as of 26 May 2017 when a -python3 version of Vim is already installed via homebrew: brew remove vim brew cleanup brew install vim --with-python3
17 votes

How do I alias python3 on Windows?

I want to alias python3 to python on Windows. You haven't mentioned what release of Python you are using (e.g. "vanilla" Python, Anaconda, SciPy, etc.), but if I am not misunderstanding, ...
  • 15.9k
12 votes

RuntimeError: imageio.ffmpeg.download() has been deprecated. Use 'pip install im ageio-ffmpeg' instead.'

That's caused by the update of imageio Use this instead: sudo pip3 install imageio==2.4.1
11 votes
Accepted

qtpy.PythonQtError: No Qt bindings could be found

I faced a similar problem, however, for me, the solution was an easy one. Please go through the following points. Keep a native python installed on your machine. Run "pip install pyqt5-tools" from ...
8 votes

How do I install vim on OSX with Python 3 support?

Already get to make it work. vim formula installs vim with python3 support only if python --version is version 3. Doesn't matter if brew install python install python version 3 (because it does in ...
  • 181
7 votes
Accepted

How to change default python executable on Windows 10?

This is most likely due to the path variable. You can see this in a command window by typing Path at your prompt. To update the settings, Open the 'System' properties. Open Environment Variables ...
  • 1,244
6 votes

Git-Bash not running Python3 as expected, hanging issues

This is a known issue for windows 10. GitBash's terminal has issues with windows-native apps, such as python, powershell, ipython, etc. The terminal eats events, such as your screenshot. This breaks ...
  • 255
5 votes

Django's dev server causes permanent high CPU load with Python 3

To answer my own question: Django's dev server checks all Python source files periodically for changes. Setting the option --noreload prevents this auto-restart mechanism, which also reduces the idle ...
5 votes

How do I install vim on OSX with Python 3 support?

Since version 1.6.0 of Homebrew (2018-04-09), the default python version is 3. Thus, if you have a version of vim installed before this change which is compiled with python2, what you need to do now ...
  • 151
5 votes

Switching between Python 3.5 and 3.6 in Windows 7

Call py.exe instead of python: py -3.6 will open a 3.6 shell; py -3.5 will open a 3.5 shell; py (check the version of an open shell: it could depend on installation and further settings). Source: ...
  • 12.4k
5 votes
Accepted

What's the difference between the keywords 'python' and 'python3' in command lines?

You can install multiple versions of python simultaneously in your system. Currently, python versions 2.x.x and 3.x.x is installed in your system. Python3 is installed alongside with python(2) ...
  • 166
5 votes

How do I alias python3 on Windows?

If you are using the Windows PowerShell and not the command prompt, you can use the following code: Set-Alias -Name python3 -Value python or use the following code: Set-Alias -Name python3 -Value &...
4 votes

How do I install vim on OSX with Python 3 support?

I got the same issue today. No matter brew install vim --with-python3 or brew install vim --without-python --with-python3 So i check Homebrew's logs at ~/Library/Logs/Homebrew/vim, in 01....
  • 141
4 votes

How do I install vim on OSX with Python 3 support?

It is because there was an already installed vim in your system which is normally found in /usr/loca/vim $ which vim You can try ls /usr/local/Cellar/vim/7.4.2210 and take a look what folders are ...
  • 181
4 votes

How do I install vim on OSX with Python 3 support?

Put the following in you .zshrc or anything . rc: if (command -v brew && brew list --formula | grep -c vim ) > /dev/null 2>&1; then alias vim="$(brew --prefix vim)/bin/vim&...
4 votes
Accepted

Setting up IDLE with Python 3 in Fedora

python3-tools is a collection of tools included with Python 3 that provides the idle3 program which it installs to /usr/bin/idle3 and it also installs idle3.4 to /usr/bin/idle3.4. To install python3-...
  • 13.2k
4 votes
Accepted

Installed Python, but cannot run `pip`

The problem is that you are entering pip in the wrong command line. You are entering it in the Python CLI whereas it has to be used in the regular Windows command line. Is pip intended to be used ...
  • 4,350
4 votes

Error while starting Jupyter notebook from terminal on Mac OS

The issue was a bad config file that got in there somehow. This answer https://github.com/jupyter/notebook/issues/274 helped me resolve the problem. I had to go to the folder path that was returned ...
4 votes

Python3.6 dependency missing on AWS Linux 2 AMI with EPEL

you have to install python3 from amazon-extras repo: amazon-linux-extras install python3 There is a caveat: according to amazon-linux-extras list | grep python3, currently supported version is 3.6....
  • 41
4 votes

How to NOT change the shell prompt when activating a Python venv?

The prompt of the Bash shell is controlled by the PS1 variable. The activate script — near the bottom — keeps its old value in the _OLD_VIRTUAL_PS1 variable before prepending it with the venv's name: ...
  • 175
4 votes

Pip3 not working at all

I figured it out thanks to Anaksunaman in the comments. I followed this post on GitHub, and it worked! It turns out, the problem was exporting the DISPLAY variable for my X-Server that I was using. ...
3 votes

How do I install vim on OSX with Python 3 support?

Another way to install Vim with Python3 support is using port from The MacPorts Project: To check how many variants available for VIM and their conflict: port variant vim To install vim with ...
  • 569
3 votes
Accepted

How can I run a Python 3 script?

You have registered for Ask Ubuntu Q&A, so I'll provide the command for Ubuntu. In Ubuntu open the terminal and type: sudo apt install python3 idle3 ipython3 python3 is already installed by ...
  • 13.2k
3 votes

Is there a way to get python's help() to work in the SublimeText 3 console?

For anyone ending up here from a search, importing the help function from the pydoc module seems to be working: >>> from pydoc import help Notably, it works with the Sublime plugin API ...
  • 31
3 votes

How to delete lines after : if value is >5 in Notepad++ or Python

In the Notepad++ Replace dialog, use the Regular Expression ^[^:]*:.{0,5}$ as shown below: This Regular Expression will match the first instance of the : character, and ignore any that appear later ...
  • 4,418
3 votes

How to delete lines after : if value is >5 in Notepad++ or Python

I assume that we need to count all the characters after the : and up to the end of the line. Use the Find dialog, Mark tab, to Mark All using the Regular expression : :(.+){6,} This will mark all ...
  • 430k
3 votes
Accepted

Why is Sublime Text 3.2 highlighting commas after values that start with "for" in Python dictionaries?

It is, in fact, a bug that they are going to fix with the next update. However, for now, people can manually apply the fix themselves. See the pull request here: https://github.com/sublimehq/...
3 votes

How to downgrade Python 3 to Python 2?

You don't. Python 2 and 3 are actually different languages/runtimes If you call python it is python2, and if you need python 3 its python 3. on ubuntu 18.04 for example invoking python directly ...
  • 125k
2 votes

How can I run a Python 3 script?

On many systems, "python" defaults to "python2", but you can run a script under python 3 simply by doing python3 myscript.py Issuing which python3 will tell you if that's going to work. Also, if ...
  • 1,124

Only top scored, non community-wiki answers of a minimum length are eligible