Skip to content
Advertisement

Tag: python

Using a compiled Python shell in Linux

Is it possible to use a “more complex” shell than just a single command shell? We have written a python shell that is a command loop, and it works fine in /etc/passwd like this: Of course the Python file has the shebang line for /usr/bin/python in it. However, we’d like to compile the Python shell into a .pyc file to

Error building Tensorflow on CentOS 7

I am trying to compile Tensorflow (r1.3) on CentOS 7. My environment: gcc (g++) 7.20, bazel 0.5.3, python3 (with all necessary dependencies listed on tensorflow web site), swig 3.0.12, openjdk 8. Everything is installed in the users scope, without root access. Whenever I am trying to build a python package invoking following command “bazel build –config=opt //tensorflow/tools/pip_package:build_pip_package” I am getting

Problems establishing connection with DB

Platform: LINUX. I am a beginner of MongoDB and pymongo. After installing pymongo, here is a simple test I tried on ipython: At this point, it chokes. And in the end, spits out a “Error 111: connection refused” error. So, I tried invoking MongoDB straight from the terminal and I still got the error below [look at the far end].

Issues importing python-pptx on Linux (Ubuntu 17)

I am trying to import the python pptx library in a python programm. I installed it using pip before, which gave me the following output: So this seems to be a success. But as I am trying to import the module using the following code: It says No module named ‘pptx’. It must have something to do with Linux since

SSH and exec channels with python shell

We have implemented a python shell for our hardware devices that solely consists of the python cmd module on embedded linux. Our (non-root) user’s shell is set to the path of this python shell in /etc/passwd and /etc/shadow. Code example below: Previously, one of our clients had used SSH.NET to issue command line commands using that library’s RunCommand function, which

How do I run a Python Qt file in Ubuntu?

Here’s the sample code that I want to run: The file is saved as sample.py. The following command isn’t working: Answer You need to start the Qt event loop by calling app.exec_() once you have initialised the widgets and called show() on your main window.

Advertisement