Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.
0
votes
1answer
12 views
apt-get cant remove the package that couldn't fully installed
I accidentally stopped opera browser installation session.Now if I try to install remove packages or making any other actions its giving me the following error.
(Reading database ... 235216 files and ...
3
votes
0answers
15 views
Block port on boot2docker vm on virtualmachine
I have Boot2Docker image running in VirtualBox on my mac. I use Kitematic to run docker on my Mac.
I have activemq docker running, on port 32769 in boot2docker vm. I have application running which ...
0
votes
1answer
27 views
Installing Packages in PyCharm
I'm using Mint Cinnamon (very new) and tryign to get some packages in PyCharm. When I use the package installer for Numpy or Pandas I get the error message:
collect2: error: ld returned 1 exit status
...
2
votes
1answer
18 views
How can I make a udev rule using a “sibling” device's serial number (for USB devices with no unique serials)?
I have testing equipment that is made-up of the following:
a USB Hub connected to the master PC, the hub is embedded in the test jig and is used so that we have only 1 USB cable running from the jig ...
-1
votes
2answers
17 views
W3af Installation [closed]
i'm trying to install w3af on fedora. I got the message:
the setuptools are already installed
but w3af still ask to install them. My question:
Is there any difference between python2-setuptools ...
1
vote
1answer
26 views
Force dpkg repair
I did a terrible mistake and deleted two folders from the /usr/lib directory on my Debian. I deleted python2.7/ and pkgconfig/
Things I've tried to fix it without success:
sudo dpkg -i python2*
-> "...
0
votes
1answer
52 views
Can't run some Python programs after Debian upgrade
I did apt-get dist-upgrade yesterday and now I get the following error when I try to run anki:
Traceback (most recent call last):
File "/usr/bin/anki", line 5, in <module>
import aqt
...
0
votes
1answer
23 views
How to sandbox code in chroot for multiple users?
What am I trying to do?
I'm writing a code evaluator using chroot and python and went to hackerrank for some inspiration.
What I think is happening at Hackerrank?
Hackerrank creates run-...
1
vote
2answers
62 views
zipimport.ZipImportError: can't decompress data; zlib not available
On RHEL 6.6, I installed Python 3.5.1 from source. I am trying to install pip3 via get-pip.py, but I get
Traceback (most recent call last):
File "get-pip.py", line 19177, in <module>
...
0
votes
1answer
44 views
yum is broken because of missing Python module (RHEL 6.4)
When I run $ yum I see:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/libssh2.so.1: symbol EVP_aes_128_ctr, ...
0
votes
0answers
24 views
Shell script invoking python does not resume on MacOS
I have a shell script that invokes Python on my MacOS. After that invocation completes successfully, the script execution is not continued by terminated:
curl "https://s3.amazonaws.com/aws-cli/...
0
votes
1answer
31 views
Various scripts I see will not run through python
I am very confused as to why I get syntax errors when attempting to run scripts such as the one contained in the answer below:
How do I download PDFs from PubMed, given their IDs?
Am I not supposed ...
0
votes
0answers
15 views
server load and performance testing
Dears, there are some cluster of servers that are responsible for a telecommunication company databases. the OS's was Linux Redhat installed on bare metal till now, but all the clusters are migrating ...
2
votes
0answers
14 views
How do you install Django when there is a problem with scl?
scl is installed on RedHat 6. The man pages for scl work. I want to install Django. I believe that a prerequisite is to install SCL for Python.
$scl -l
returns nothing. I believe that this is ...
1
vote
1answer
16 views
Enable SCL python27 so other RPMs can see it
Trying to create an RPM that uses Python 2.7 on a RHEL 6 machine. I'm using SCL to enable Python2.7 and building the RPM with it fine. However, when I try to install that RPM on a different system ...
0
votes
0answers
28 views
My python code does not print histograms in the terminal as designed
I'm using Cygwin64 Terminal to run a Linux putty to conduct scientific analysis. I have little to no experience programming experience. I am trying to run an analysis program to using python code and ...
0
votes
1answer
21 views
How do i run my python file from any directory on my computer [Arch]
I am currently trying to run gprof2dot on the gmon.out created by using the -pg option while compiling.
Now I have already done pip install gprof2dot. How am I supposed to run this on the gmon.out ...
3
votes
1answer
23 views
Can't use global shorcuts for Python applications
I'm using bash on a Mac. My problem is every time I try to run an installed Python application I just get a message that the command can't be found. Like so:
-bash: gcloud: command not found
Doesn'...
-1
votes
0answers
9 views
I am getting a syntax error when trying to lock a label in ClearCase in a python script [migrated]
I am new to python and I am trying to execute a cleartool lock command.
Here is my code:
def lock_label(lname):
os.system('cleartool lock lbtype:' + lname'@vob:/cm_data/jupsw')
lname is ...
1
vote
0answers
30 views
How to install mailman when it needs an older version of Python?
I am working on an install of mailman 3.0.3 on Ubuntu Server 16.04 which ships with Python 3.5.1 and 2.7.11. Per Barry Warsaw that version of mailman requires Python 3.4.n. https://gitlab.com/mailman/...
1
vote
0answers
19 views
How do I run a supervisor command in a Eclipse PyDev project without being asked for a password?
So I've got the following code that should check whether an npm package is installed:
def is_installed(name, as_global=True):
# Returns whether NPM package is installed.
s = shell(...
1
vote
1answer
49 views
pass arguments to python program in shell
I am unable to run python script within a shell script. Following is the script.sh file where 3 arguments are being passed to the python script.
python main.py 1.0 0.1 10
The python program is not ...
-1
votes
0answers
40 views
File edition after glob function through python
I wanted to find every instances of a file under different directories and search for value 0 in each of those files and replace them with 500.
Please find the code below
#!/usr/bin/python
import ...
3
votes
2answers
67 views
obtain shell prompt in python
I want to obtain the (zsh) shell prompt in a python script. Simply using
import os
prompt = os.environ['PS1']
seems not to be the right way, because PS1 is usually not forwarded to subprocesses. In ...
0
votes
1answer
43 views
I installed python 2.7 on RHEL6 server, want to go back to 2.6
I am on RHEL6 and I installed python27 using these commands:
sudo sh -c 'wget -qO- http://people.redhat.com/bkabrda/scl_python27.repo >> /etc/yum.repos.d/scl.repo'
sudo yum install python27
...
1
vote
1answer
45 views
Updating Python on CentOS
I am running 64 bit CentOS 7 on an Oracle VirtualBox. The CentOS ISO that I downloaded came with Python 2.7.5 and I am trying to update to 2.7.11, but the normal steps are not working. I downloaded ...
0
votes
1answer
8 views
python3-pyds9 package missing in Jessie
In Sid there is a package python3-pyds9 but it seems this disappeared in Jessie. How do I get ds9 package for Python in Jessie?
0
votes
0answers
26 views
Trying to use Python SpeechRecognition on Ubuntu 14.04 but flac-linux-x86 not found
When I try to run the example script audio_transcribe.py on my Ubuntu 14.04 virtual machine I get a FileNotFoundError: [Errno 2] No such file or directory.
The thing is, I can see the exact file ...
0
votes
0answers
11 views
How to Do Trigonometric Range of Floats in Python? [migrated]
Matlab
x = 0:pi/100:2*pi;
y = sin(x);
plot(y)
I think range() cannot work here because it only accepts end arguments as integers but I need floats (0.0; 2*pi).
Pseudocode in Python 2.7.11+
import ...
0
votes
1answer
13 views
Switching from a downloaded version of python to a Homebrew one
I've recently decided I'd like to switch from my downloaded versions (as in downloaded from python.org) of python 2 and 3 to Homebrew installs. I've installed both python 2 and 3 from Homebrew using a ...
1
vote
1answer
25 views
What is ${PYTHON_REL} FreeBSD
I have an error whilst making a port, so I checked the makefile, and found the problematic line.
The issue is that I don't know how to fix it, as I don't know how to change the Python_Rel variable.
...
-1
votes
1answer
53 views
I SSH into a linux server via putty, and i have a linked drive on my windows machine. How can I access files on other drives?
I am using a linux server to run scripts and manage a database. I get to this using a SSH through PuTTY. On my windows machine there is a mapped drive to a directory (/mapped_drive/) on this server (X:...
0
votes
1answer
27 views
Is there such a notion as broadening where find searches?
I'm trying to identify redundant installations of the site package matplotlib in my python3.5 environment.
A contributor to the library (GitHub issue) is advising that I use
python3.5 -m site
...
1
vote
1answer
51 views
How to find my pip? [closed]
Yesterday I installed the pip with
python get-pip.py
and it can be regular used.
Now it shows this.
-bash: pip: command not found
so I try to use python get-pip.py to install it again.
...
0
votes
3answers
43 views
How do non-interactive programs get the permission to edit files in /etc
I'm writing a program in python that needs to edit some files in /etc. Some system some its own. How do I get those permissions from within the program itself without running sudo as the program ...
1
vote
3answers
44 views
how to spawn a separate process in the background while running a foreground process
e.g., I want run a python -m HTTPSimpleServer in the background while running a watch in the background
python -m HTTPSimpleServer; watch -n (my awesome test command)
how can I run both in ...
0
votes
1answer
44 views
CentOS: How to force pip to install Django with latest Python 3.5
I'm running CentOS, and it has pre-installed Python 2.6.6. But I want to use Python 3.5, the latest version. So I have installed Python 3.5 on my server. It's working properly.
I just compile Python ...
0
votes
0answers
28 views
save outputs and errors to external file from lxterminal
I run compiled python program like this on my linux box (runs automatically after start lxterminal LXDE lxsession autostart):
@lxterminal -e sudo /home/user/app.exe > /home/user/app.out 2>&...
2
votes
1answer
48 views
Systemd Python service not sending all output to syslog
I have a custom service and have explicitly called for all stdout & stderr to be sent to syslog in the config file, however only some of the output appears in both syslog and the journal (they are ...
2
votes
0answers
30 views
Why does tar list multiple entries for some files? [duplicate]
In a folder with a single file (image.jpg) I run the following commands
$ ls -a
. .. image.jpg
$ tar cf target.tar image.jpg
Listing contents of the archive
$ tar tvf target.tar
-...
0
votes
1answer
36 views
Running a discord.py, pyenv python 3.5.1 script on an apache2 webserver
I'm running into difficulty getting a python based discord bot to run on my apache2 webserver. I'm using the discord.py api wrapper and I installed python 3.5.1 using pyenv.
Here is my code
#!/usr/...
0
votes
3answers
29 views
How to make python3 the default version on WING IDE
I'm new to python and I've been trying to update from python 2 to 3 by doing apt-get install python3 and it installed but when I type python --version on my terminal the version is 2.7.9. How can I ...
-1
votes
3answers
44 views
Insert array of years into a list of URLS
I have a list of URLS like the example below.
/test/test
I also have an array of years
[1999, 2000, 2001].
I am trying to find a way to automate the task of printing out a list of URLS with ...
1
vote
0answers
31 views
PyOpenCL on Linux Mint: PLATFORM_NOT_FOUND_KHR
I've been trying to get PyOpenCL and PyCUDA running on a Linux Mint machine. I have things installed but the demo scripts fail with the error:
pyopencl.cffi_cl.LogicError: clgetplatformids failed: ...
2
votes
1answer
37 views
can't find documentation on json.tool [closed]
I can find scattered articles online that use json.tool to produce pretty python, but no clear documentation on usage. I checked docs.python. but there is no formal documentation of json.tool.
I ...
2
votes
2answers
82 views
Why won't this bash command run when called by python?
The command
$ find ~/foo/ -type f -iname "*.txt" -print0 | parallel -0 cat
uses GNU Parallel to print all the .txt files under ~/foo/.
I have a python script where I want to call this bash ...
1
vote
2answers
28 views
Can python extract org-mode tables from org documents?
I'm trying to write some python code that reads specified tables in org mode documents. For example, I have a file ~/foo.org
$ cat ~/foo.org
#+Title: Example Org Document
* Section One
Proin quam ...
3
votes
3answers
102 views
How can I get a python script to “remember” user input?
I have a script that asks the user for the path to their desired directory
default_path = '/path/to/desired/directory/'
user_path = raw_input("Enter new directory [{0}]: ".format(default_path)) or ...
0
votes
0answers
14 views
How to restore initial configuration, files… of python on Linux Mint
Due to a mistake when compiling Python sources (Python 2.7.11), my Python installation is broken. I can solve the problem partially by recompiling the initial version of Python (2.7.6). This solution ...
0
votes
0answers
14 views
bpython installation trouble
I have a problem with bpython:
studio@linux:~> sudo pip install bpython==0.15
Requirement already satisfied (use --upgrade to upgrade): bpython==0.15 in /usr/lib/python3.4/site-packages
...