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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
4k views

apt broken in Ubuntu 16.04

I'm tying to install python-pip package. But sudo apt install python-pip gives me the following error: $ sudo apt install python-pip Reading package lists... Done Building dependency tree ...
artem zholus's user avatar
0 votes
1 answer
79 views

about the my terminal appear this bash

Last login: Sat Jan 14 16:47:10 on ttys001 -bash: source /Users/liuyang/.bash_aliases: No such file or directory -bash: source /Users/liuyang/.bash_aliases: No such file or directory
YANG LIU linechany's user avatar
1 vote
0 answers
735 views

SNIMissingWarning & InsecurePlatformWarning in Python on Bash Windows 10 Subsystem

I really enjoy running Bash on Ubuntu on Windows 10, but I noticed that python often spits out warnings. How do I go about resolve these warnings? Thanks By the way, the links from the warnings only ...
Antony's user avatar
  • 441
1 vote
1 answer
41 views

Find the line that it starts a custom py script file

A while ago I somehow managed to make an executable file start a startup. Unfortunately, I don't remember how I did that. What I remember is that I created a custom executable file which is calling ...
Bobys's user avatar
  • 153
14 votes
3 answers
103k views

How do I make a python file executable on macOS Sierra?

I've been looking around the internet for days now, just to find a way to make a python file executable. I've tried the (chmod +x filename.py) by adding the #!/usr/bin/env python at the top, but it ...
shadown's user avatar
  • 143
1 vote
2 answers
9k views

How do I stop DeprecationWarning for Python 2.6?

I have to run this command daily in a cron to refresh certifications. # /root/certbot-auto renew --quiet /root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: ...
Chloe's user avatar
  • 5,946
2 votes
3 answers
18k views

How can I fully kill a program and/or python code running on Windows?

I was running Sublime Text 3, but it seems I've created an infinite loop somehow. I was writing an image to file but when I look in the folder I see that the image is flickering between one of those ...
whatwhatwhat's user avatar
1 vote
1 answer
237 views

What convention starts text scripts with '# -*- mode: python; -*-'?

I encountered some python scripts in the wild with this first line: # -*- mode: python; -*- I can infer that it's some indicator to some system that it should operate on the file as python, and I am ...
user avatar
2 votes
1 answer
284 views

Allow a UNIX group access to only a single file through SSH

I would like to set up a group of UNIX users which only has access to one specific Python file via SSH. That is, they should not be able to run any other commands/programs or view any part of the file ...
Ecliptica's user avatar
  • 151
-1 votes
1 answer
13k views

Python 3.6 does not run on Windows 10

Using Windows 10. First I uninstall any existing versions of Python 3 or Python 2.0 https://www.python.org/ftp/python/3.6.0/python-3.6.0-amd64.exe Then I run the above program, Windows seems to ...
Duke Dougal's user avatar
0 votes
1 answer
724 views

How to configure source files used by python setup.py (installing fasttext)

I'm trying to install Facebook's fasttext Python bindings on Mac OSX 10.12 Sierra using pip. I'm getting the following error while running sudo pip install fasttext: Collecting fasttext Downloading ...
Dennis Golomazov's user avatar
4 votes
3 answers
5k views

How to extract Python 3.5+ from installer?

In versions lower than 3.5.0 there was a .MSI installer for Windows, which had a really nice hidden option. That option looked like this: msiexec.exe /a "file.msi" /qb /L*V "file.log" ALLUSERS=0 ...
KeyWeeUsr's user avatar
  • 328
51 votes
1 answer
61k views

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

I am trying to understand different options in Python3 installation. What does the "Precompile Standard library" option mean in the Custom Python installation and why should it be enabled or ...
GP92's user avatar
  • 737
0 votes
1 answer
29 views

python 3.5 console not able to type the 'c' key

I have a very strange problem when using the python3 console. Whenever I type c (the actual c character) what gets written is the <tab> character. So in essence I can't type anything that ...
ludic's user avatar
  • 101
1 vote
1 answer
10k views

Fixing corrupt PNGs missing the IEND chunk

I have .png files outputted by a tool that converts .emfs to .pngs but that doesn't add the IEND chunk to the end. Therefore, other tools, like ImageMagick, won't go near them as they detect them as ...
Titan's user avatar
  • 221
0 votes
1 answer
2k views

conda traceback: No module named ruamel.yaml.comments

Ran conda update conda on bash terminal and below is the traceback. Any idea on what is wrong with my installation? yusuf@yusuf-pc2:~$ conda update conda Traceback (most recent call last): File "/...
Mohammad Yusuf's user avatar
1 vote
1 answer
699 views

Password-protect a web service (flask-based) without changing it's code

I'm using beancount's 3rd-party web UI, fava. Basically that means I run a web service on a certain port. There is no authentication or security for that web service. In case it's important, fava uses ...
Ng Oon-Ee's user avatar
  • 185
0 votes
1 answer
3k views

Installing PIP without root access

How do I install pip without root access? Specifically: I cannot sudo. When I do, I get sudo: effective uid is not 0, is sudo installed setuid root? I ran get-pip.py and got the following error: ...
Lincoln Bergeson's user avatar
0 votes
1 answer
2k views

Getting Access denied message in command prompt

I recently installd python on my system and am trying to make a directory for python files in my Windows 8.1 system using the command prompt. When I write the following simple command in cmd, mkdir ...
Dark_Knight's user avatar
-1 votes
1 answer
4k views

I can't install pip for python 3.5

My friend owns a Raspberry Pi, and no matter what we try to do we cannot get pip3 installed for python 3.5. We've tried get-pip.py, but that only works for 2.7. We've tried sudo pip install -U pip, ...
Dev's user avatar
  • 129
1 vote
1 answer
8k views

How do I redirect output from python to file

I want to redirect all output (stdout and stderr) of console to the text file. I make the following steps: Open cmd.exe Start command: "python.exe" > "file.txt" After that, I'm waiting for the ...
neo's user avatar
  • 111
0 votes
1 answer
313 views

How could I make a scalable computer out of multiple single-board computers?

I've been looking into getting a C.H.I.P. single-board computer (think a cheap Raspberry Pi) to use as a decently cheap Python dev environment, but I'd like more power. I've considered getting a ...
JessLovely's user avatar
1 vote
0 answers
235 views

Make a full deb package with dependencies

I'm working on a offline Debian Jessie server. I want to install Python 3.4 on this server, so i tried to use the .deb package from the official repo. My problem is that the DEB package does not ...
Dynamite's user avatar
  • 153
0 votes
1 answer
69 views

Python pip version paradox

I downloaded Python 3.5.2 and installed it on 3 different computers. Now the weird part is that in each pc I got a different version of pip: Computer 1 (win7-x64): pip --version -> 7.1.2 ...
DimChtz's user avatar
  • 103
2 votes
1 answer
440 views

Gzip huge directory into separate .gz files for ssh transfer

I have a directory of ~200.000 .npy files with a total size ~100 gb. All files are stored directly below the main directory (i.e. there's no sub-directories). I need to transfer the directory and ...
pir's user avatar
  • 301
0 votes
0 answers
57 views

MySQL and Python shells don't insert the letter 'b'

It's weird, but I can't insert the letter 'b' into the MySQL and Python shells. My keyboard works perfect and the 'B' key is being inserted (shift+b). It also works into Zsh, Vim, etc... I'm using ...
Unix's user avatar
  • 109
2 votes
0 answers
50 views

python on raspberry pi

Python script executed from cron shows only 10 results for temperature read on 1-Wire sent to mqtt broker, while script executed from command line works without any problem continuously. Can someone ...
6y3e's user avatar
  • 21
1 vote
0 answers
279 views

Browser is not storing my cookie

My challenge is sending my cookie along with my payload. I'm simply adding a cookie to an existing, and running program. The payload (song) is getting there just fine. And, I'm not getting any errors ...
Iggy's user avatar
  • 19
0 votes
0 answers
135 views

Access pycharm server from anywhere on the internet

I am working on a django project and want to show current state of project quickly to the client. Currently i can access develpement sever using the following URL. http://localhost:42333/my_project ...
Cody's user avatar
  • 119
0 votes
1 answer
2k views

Python runs code whenever I hit enter....just started doing this

I just starting learning Pyhton. In my first class we wrote some super-basic code in Idle. I tried to play around with a homework problem and noticed that after I type a line of code, I hit enter, ...
Michael Santus's user avatar
0 votes
1 answer
3k views

Move files with the same name but different extension to existing location containing files with same name

I currently have a parent directory with 10 folders with 10 different dates for names (ie. 2016-11-21, etc.) In these date folders, are WAV files with unique file names. Separately, I have ...
Terence's user avatar
0 votes
1 answer
59 views

Linux python scripting check for directory that have the same name but different case

Using an ntfs partition on an external hard drive on Linux, I would like to be able to rename directories that have the same name with different case in order to user the same disk on Windows. The ...
user3714670's user avatar
-1 votes
1 answer
920 views

Web Server on Pen Drive - Windows

I would like to know if it is possible to create a web server in a pen drive. The Web Server must have python, PHP, MySQL etc... installed on it and run without any trouble. I saw a few articles ...
user7122079's user avatar
0 votes
1 answer
406 views

How to cycle through multiple network interfaces in Linux (bash), running an app using each one separately?

I am building a small Raspberry Pi based device which will have multiple 3G dongles, each with a different provider's sim card inside. I want to run the cli version of speedtest (speedtest-cli) ...
Harel's user avatar
  • 73
0 votes
1 answer
3k views

Why won't Seaborn install on PyCharm or in the command line?

When I try to install seaborn in PyCharm by adding the package to my available packages, I receive an error stating Non-zero exit code (1) It provides a proposed solution which is as follows: ...
CJF's user avatar
  • 31
0 votes
0 answers
2k views

Install 64 bit Pythonxy 2.7

I don't succeed in installing pythonxy 2.7 in a 64 bits environment. After downloading pythonxy 2.7, the installation does not ask for which version I want. I have to treat large data and I need ...
Agape Gal'lo's user avatar
1 vote
5 answers
6k views

Schedule [Virtualenv Dependent] Python Script with Windows Task Scheduler

I want to schedule a Python script to start at 3AM and break at 5PM every weekday. However the problem arises when I need to start virtualenv as all the packages are install in a virtual environment. ...
ng150716's user avatar
  • 111
1 vote
3 answers
11k views

Running remote ssh command with spaces?

I am trying to run a remote script in windows over ssh, and I cannot figure out how to handle the quotes. (Both host and client are windows machines.) This is the statement which works fine on the ...
lukehawk's user avatar
  • 125
1 vote
1 answer
1k views

Upload .eml files to Gmail over IMAP

I have a bunch of directories of eml files that I want upload to gmail using IMAP. I've used IMAPSync in the past to sync two IMAP accounts but these messages are just sitting on a file system as eml ...
mpmackenna's user avatar
1 vote
1 answer
13k views

Why am I getting the message "No module named httplib2"?

Can anyone explain why I'm being told there is no httplib2 module even though it comes up under the pip list? Johns-MacBook-Air-8:~ jyamamo$ pip list httplib2 (0.9.2) pip (8.1.2) setuptools (20.10.1) ...
John R. Yamamoto-Wilson's user avatar
0 votes
0 answers
24 views

Assign mutiple aliases to web modules on one server

I'm currently using Tornado on a Windows Server and looking for a way to create aliases on my network and i want these aliases to be redirected on a different port of my webserver. Example : Tornado ...
z4nzi's user avatar
  • 1
2 votes
1 answer
3k views

Python script suddenly getting 'Terminated' with no other messages

Running Ubuntu 14, I have a script which runs in a tmux session 24/7. Sometimes when I come check on it, it will just have ended and say in the last line 'Terminated'. This happens arbitrarily, ...
dan's user avatar
  • 131
2 votes
1 answer
76 views

The individual parts work, but piping data through them breaks it

In short: I am trying to build another output for ping, that works better for some stuff I am trying to do. For that, I pipe the ping output to sed, to remove everything but the milliseconds it takes. ...
CodenameLambda's user avatar
1 vote
0 answers
864 views

Switching between a python 2.7 Jupyter Notebook and python 3.5 Jupyter Notebook

Due to some of the work I do and classes I am in I frequently find my self needing to use both python 2 and python 3 jupyter notebooks. I installed both notebook servers using pip (pip3 for python 3 ...
bs7280's user avatar
  • 185
29 votes
6 answers
85k views

Cannot install python-pip with yum

I am trying to install python-pip in a centos7 docker container, but I think I may be missing some package or something. [root@aasdfasdfa /]# yum -y install python-pip Loaded plugins: ...
Alex Cohen's user avatar
3 votes
1 answer
4k views

Running Python script in Scripts from different working directory in Windows

I have pip installed a library (intelhex) with Python 3.5.1, which also places a few scripts in the Scripts subdirectory of the Python installation: >dir "%pythonpath%"\hex2* Volume in drive C is ...
handle's user avatar
  • 285
0 votes
1 answer
529 views

install paramiko on my Mac OS X 10.11

I tried to install paramiko on my Mac OS X 10.11 sudo pip install paramiko Password:******* then I got The directory '/Users/bheng/Library/Caches/pip/http' or its parent directory is not owned by ...
code-8's user avatar
  • 444
3 votes
3 answers
3k views

How to Access two different programs from PATH, both having same name in Windows 10?

I added addresses of python 2.7, and Anaconda 4.1.1(Python 3.5) to PATH variable in Windows 10, whenever I run "python" from cmd, program which was added earlier is executed.How can I access both of ...
Yogendra's user avatar
  • 133
0 votes
1 answer
2k views

Using Python Pip from behind Sophos firewall with certificate

I have this problem using pip at my workplace since the System Admin has started using the Sophos XG Firewall with a custom CA installed in my windows local system and firefox. I don't have any proxy ...
LazyLeopard's user avatar
1 vote
0 answers
275 views

I need assistance with building GIMP to run under AWS EC2 instance and Lambda

TLDR; I need to build an instance of the Gimp application that runs under AWS in a Lambda and on an EC2 linux. I'm building a micro service that uses AWS API Gateway with python Lambdas. I have the ...
John Morrison's user avatar

1
35 36
37
38 39
63