where can i find pyqt examples folder in Mac Os x? - pyqt4

I've installed pyqt on mac os x and it's up and running well. But i can't find the pyqt examples folder? May i know where this is located by default..

Another way to access them fast is via a github mirror:
PyQt5
https://github.com/baoboa/pyqt5/tree/master/examples/
PyQt4
https://github.com/ipatrol/pyqt4/tree/devel/PyQt-win-gpl-snapshot-4.8.4-69c456457274/examples

First you need to tell us how did you actually install PyQt. If you do it via MacPorts, which I recommend, your port name is qt4-mac. (You can check it via port list installed command.)
By default the installation doesn't include demos or examples. You can include both with:
sudo port install qt4-mac +demos +examples
This procedure is quite slow, up to several hours.
In /opt/local/share/qt4/ folder you'll find demos and examples, and in Applications/MacPorts/Qt4 will be qtdemo.

Related

Mac zsh: django-admin command not found

I have zsh on my mac. I did simlink as you recommended in here django-admin command not working in Mac OS so in my directory /usr/local/bin I have another folder bin with files __pycache__ django-admin.py.
However there is still the same problem and I receive zsh: command not found for django-admin as well as django-admin.py
Any alternative guys? I am pretty new into programming and computer science :(
Python 3.8 Django 2.1
before going any further in your discovery of Python and Django, you should take a moment to learn about virtual environment in Python.
Virtual env are highly recommended when working with Python. Among many other advantages, they simplify the access to installed packages, or command line utilities like django-admin.
I picked a tutorial that looks ok but there are plenty of them on the web : https://realpython.com/python-virtual-environments-a-primer/
Good luck in your pydventure ;)

Install an external library instance of libv8-3.14 to folder

I need libv8-3.14 to run some R packages on linux, but I don't have root access/sudo access on the linux computer I'm using so I'd like to install an external folder instance of libv8-3.14. I've seen R packages reference this as external as CDFLAG="folder/v8-3.14" so I know it is possible.
I'm new(ish) to linux but I've installed external libraries before with tar.gz files which then have a configure file in them, which I set the external folder with ./configure --prefix==/folder/loc, but the only downloads I can find of libv8 are .git (which I can't get to work either).
How can I install an libv8-3.14 to a folder and install so I can set:
export PATH=$PATH:/path/to/install/
and
export `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/install/`
I had the exact same problem. In case somebody in the future comes across this post, I will leave my suggestions and how it worked out in the end. Also, all credits go to an experienced colleague of mine.
The most sure thing to do is to consult IT, or someone who has already had the same problem, there is usually a workaround these issues.
A way you can do it yourself:
Create an anaconda environment, you can name it 'V8' or something (make sure the environment is based on the latest python version, or recent enough for r-v8).
activate it
install the conda version of the V8 R interface with conda install -c conda-forge r-v8
That's it. Whenever you need V8, fire up your environment beforehand, and it should be A-OK.
Further advice: If you run into errors when installing r-v8, it may be a good idea to update your conda and all the packages. However, depending on your conda version conda update conda and conda upgrade --all MAY BREAK your conda installation, so be careful. (For further information on this problem, see the endless complaints of people in this issue: https://github.com/conda/conda/issues/8920).
V8 doesn't use autotools, so it has no ./configure. In fact, it provides no installation facilities at all, because it is meant for embedding, not installing.
What I would try is to download the Ubuntu package (guessing from your other question, you are on Ubuntu, right?) for the right architecture from https://packages.ubuntu.com/trusty/libv8-3.14.5, and extracting it manually. .deb files are just ZIP archives.
As a side note, there's no point in setting PATH, because libv8, being a library, provides no executables. LD_LIBRARY_PATH is all you need.

How to combine two versions of the python3

I need some advice.
I have a custom module requires version Python3.5 during installation or later versions. (no critical for run my script)
My script will simultaneously use "some_decoder.pyc" file which was compiled under Python3.3 (legacy) and need this version for run. (critical for run)
How I can to solve this problem if I use Linux and virtualenv?
I have one idea in two steps:
I install basic module under global environment (Python3.5).
I will create an environment which inherit basic modules but use python3.3 (in Windows I was able to do so)
But I hope that this problem can be solved in a different way, or redirect me where this problem was solved.

python-poppler-qt5 install error on win7

Direct installation of no, the named sipdistutils module python-poppler-qt5 problem, so I found a place on the Internet from the python-poppler-qt5 folder, there is a mistake in the image above
My environment: python3.4 pyqt5.4
I want to use pyqt5 to make a PDF reader.
You must also install the poppler-qt5 library. Python-poppler-qt5 is
only the python binding for the library.
See https://sourceforge.net/projects/poppler-win32/

Installing Python2.7 on a linux server without root privileges

I am trying to install python2.7 over given python2.6 on a web server. I am stuck at the last step trying to link new python install over the old one.
The steps I have done:
Downloaded and extracted Python 2.7
configured with --prefix=$HOME/.local
make install
What I don't get is how to link by making changes in .bashrc (and what changes to make). I looked over all the places but most the answers are not generic.
Also, I have to install couple of other lovely python stuff, like pip virtualenv, django, nltk over this. A little help on that would be too great.
Ok, without root privileges you will have to have all the python stuff and your code in your home folder. And also you won't be able to configure your nginx/apache/whatever http server you use. Does not seem like a good idea for production, but for development - sure, why not.
This means you will need to install python in your home folder. You can download and compile, but probably the simplest way to do so is pyenv - https://github.com/yyuu/pyenv. Some reading is required to understand its concepts, but it is much simpler than fiddling with manual compiling if you are not sure what you're doing.
Also it kinda replaces virtualenv, but you can still have it if you want. And of course, it all works with your non-root user. There is an installer that doesn't require root either.

Resources