Python code autocompletion with Gnome-Builder - gnome-builder

I created a project with gnome builder using the Gnome Application template, opened the main.py file that is generated by the builder to test intellisense for python code and realized that it doesn't work.
The jedi extension for python is enabled, I also installed the jedi package (apt-get install python3-jedi) but intellisense still doesn't work.
What more can I try?
I am using Builder 3.32.4 and Python 3.7

Related

install python using GUI pyqt

is it possible to develop a pyqt application and check if python is installed, if not can we install python from the same application?
i need to install python through a pyqt standalone application(exe).
when i double click on the exe it should download python and install.
Yes, this is possible. You will need to do the following:
Develop the code on a computer with Python and PyQt, convert the python code into a executable (.exe) file (if you would like to deploy to windows)
Send this .exe file to the user computer and then run it there

How to run GTK3 Python3 script outside of MSYS2 in Windows

How can I make my GTK3+ Python script work outside of Msys2's own Python interpreter, into my own venv (virtual environment) Python3 interpreter? I want to prepare my Python 3 script for distribution to other computers, but without Msys2.
I'm using Windows 10.
I've successfully followed the instructions on GTK's website, to download GTK3+ and the Python bindings, in Windows.
I've installed GTK3+ and the Python bindings using MSYS2. My script runs successfully within MSYS2's Python3 interpreter in C:\msys64\mingw64\bin. However, I want to run my Python script outside of MSYS2, with a separate Python 3 interpreter (venv) - not the one in MSYS2.
From my research, it seems that I need to copy the GTK3 .dll files and icons from
C:\msys64\mingw64\bin
and C:\msys64\mingw64\share
to the Python3 interpreter path that I want, with my script files in there too.
But when I attempt to run my script in the virtual environment, I get:
builtins.ImportError: cannot import name '_gi' from 'gi'
Any ideas? Thanks.
I don't know if that is possible.
But if the final intent is to distribute your app, then you should install PyInstaller inside MSYS2 and generate an executable there. Then you'll be able to distribute and execute your app on any Windows machine.
It will only be possible to run your program using the MSYS2 Python interpreter and with all of the required libraries. You can't just copy files and then run them with the Windows Python interpreter that was built using MSVC.
PyInstaller is a good solution to package an app with the interpreter and all of the libraries. The issue you mentioned about getting errors about no module named '_struct' has been fixed.

report lab libraries not working when python 3.5 script is run from OSX Automator

I have many python 3.5 scripts to handle my business affairs. All of these run perfect from IDLE and from the bash shell. When I create OSX Automator apps they all run well except the included reportlab functions do not work. I have also attempted to create the app with py2app but this fails to find the qt4 and reportlab libraries and fails. Any suggestions?

How to use pip with Visual Studio Code

I have python 3.6 installed, I have a python extension installed on Visual Studio code but I still can't use pip on Visual Studio code. It says it is not a recognised command. Any help please?
Update: I tried installing pip manually but a file in python2.7 keeps stopping. What's bothersome is that I uninstalled python 2.7 ages ago and I've currently removed every folder with it but python-V still says I have python2.7.6 installed.
I'm on windows 10
I found some solution on this website:
https://pip.pypa.io/en/stable/installing/
If you use Visual Studio Code, you can type the following command:
C:\> py -m pip
If everything is alright, you should see the list of commands, which you can use. They are listed in your terminal, as per below.
I also would advise you to check/select the version of Python you are using:
VSCode: There is no Pip installer available in the selected environment
I am pretty sure your problems of VSCode not finding the correct version of Python will be resolved if you add your ( Python 3.6 installation ) location to the system path.

How to include the Scrapy library in the Python runtime path

Python beginner here. I downloaded and installed latest version of Python on my Windows 7. I also downloaded the zip file for Scrapy. Now is it just a matter of putting the 'scrapy' folder in the 'Python' installation directory?
How will Python pick up Scrapy? I come from Java background, and am used to putting the jar file under the 'lib' folder. Is it something similar
Did you read the installation instructions?
And if you read the docs you would see that Scrapy works with Python 2.7 -- support for 3.x is work in progress.
If you install Scrapy the default way with pip install scrapy you would not need to care about the Path and the dependencies would be all installed too (something similar to Maven or Gradle but not exactly that).

Resources