Questions tagged [python]

Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at Stack Overflow (https://www.stackoverflow.com) instead.

About

Wikipedia has much more: http://en.wikipedia.org/wiki/Python_(programming_language)

The official website is here: http://www.python.org/

Python's direction and language development is still controlled by its original author, Guido van Rossum. Guido is now an employee of Google, which uses Python exclusively as its glue/scripting language. He is affectionately known as the language's 'benevolent dictator'.

As of Spring 2011, there are two major development branches of Python: 2.x and 3.x (Python 3000). Python 3000 was released with many breaking syntactic changes as a result of efforts to promote consistency in the language and to fully integrate Unicode support. This has led to slow adoption of the new version, as many people are dependent on the extensive libraries available in Python and many libraries have not been upgraded to support Python 3.

Tag usage

Use for questions about computer hardware or software related to Python. Do not ask programming questions as they are off-topic here. Ask them on Stack Overflow instead.

3152 questions
27
votes
4 answers

Uninstalling Python 3 on a Mac

I installed Python 3 to learn Python and quickly realized that django isn't compatible with Python 3. How do I uninstall Python 3 on my Mac so that I can install a different version?
Solomon85
25
votes
4 answers

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

I am using Python 3.7.3 to run a GET request to a PHP file hosted on my website. However, when I run it I receive the error below. I have installed requests through pip3 on Homebrew. I am using macOS Mojave. Traceback (most recent call last): …
mac
  • 353
15
votes
2 answers

Python / Selenium / PhantomJS: "Unable to start phantomjs with ghostdriver."

I'm trying to get Selenium to use phantomjs on a Windows machine. My code compiles without any error: from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import cookielib import re from…
Alkanshel
  • 327
11
votes
7 answers

vim could not load library python27.dll

I need Windows 7 + vim + python for writing vim plugins. :python print("hello") E370: Could not load library python27.dll E263: Sorry, this command is disabled, the Python library could not be loaded. Tried everything: reinstalled vim uninstalled…
11
votes
2 answers

How to fix “ERROR:root:code for hash md5 was not found.” when using autojump on macOS

when type in j in shell, we will receive error message like this ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File…
7
votes
3 answers

What "requirement" do I need to give to pip?

I am trying to install PyECC on a Windows 7 machine. Pip is pretty inconsistent, so I'm not sure what it wants this time. First I ran pip install PyECC and got Collecting PyECC Could not find any downloads that satisfy the requirement PyECC Some…
Melab
  • 1,101
6
votes
3 answers

Is it possible to install python packages without a direct outbound network connection?

I have a server (RHEL) that I need to install specific python packages on. However, my server is firewalled off from internet access so I am not able to install any packages using pip. Is there a way to "manually" download packages to my local…
GregH
  • 891
6
votes
1 answer

Installing python pymssql

I am trying to install pymssql with no luck: pip install pymssql Downloading/unpacking pymssql Downloading pymssql-2.0.1.tar.bz2 (1.9MB): 1.9MB downloaded Running setup.py (path:/tmp/pip_build_root/pymssql/setup.py) egg_info for package pymssql …
bizkit1
  • 61
6
votes
1 answer

Installing Python3 on MacOS using Homebrew has error "Failed to import the site module"

So I'm trying to reinstall python3 using Homebrew on Mac OSX El Capitan Version 10.11.6, but I keep getting errors. The commands I'm using to install python3 are the following: $ brew install python3 The first command seems to work fine, no errors…
stwhite
  • 160
5
votes
1 answer

python command to print docstrings in file

What is the command-line to print the docstrings in a given Python file? I thought there was something like: $ python --showhelp foo.py Name Help -------------------------------------------------- bar This is the…
tony19
  • 503
  • 1
  • 8
  • 19
5
votes
1 answer

Change install path to /usr/bin instead of /usr/local/bin

A simple question, but I have no concrete documentation to confirm my answer. When installing software with the make install command under a unix machine, the default path is going over to /usr/local/bin. I would like to update a package…
user1678788
4
votes
1 answer

SWIG version check?

Is there any command line check for the version of SWIG ?
Arkapravo
  • 501
4
votes
2 answers

Installing twisted on python 3.5 and virtualenv using pip

when i run pip install twisted in the command line in windows, it starts installing packages until the flowing line comes up. failed building wheel for twisted pip then crashed soon after, saying it has failed the installation. why is this ? is…
3
votes
1 answer

Can't find Python's 2to3 utility on Fedora 20

I can't seem to find Python's 2to3 conversion tool anywhere on Fedora 20. I can't find an RPM (except an old OpenSUSE one) either. Any ideas?
Begbie00
  • 363
2
votes
1 answer

Can you reset Python's sys.path?

I've been doing some work with Python, and I believe my sys.path has "lost" entries. Specifically, I can import no libraries whatsoever (it works if I place them in the folder with the program, but placing it within Python's library directory…
1
2 3
8 9