I have a series of apps installed in Ubuntu 18.04 using Anaconda. They run just fine, but the menus appear as blank.
Some of these apps are:
Spyder
Orange 3
qtconsole
For all of them I obtain the same error when I execute them:
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
I have been trying to sort it for hours without success.
Any idea of how to fix this?
As a quick fix, add
export QT_STYLE_OVERRIDE=gtk2
to your .bashrc. Then your menus should at least have some text again.
This is not strictly speaking a GTK theming problem. Instead, this is because your Qt version is old. You need install qt=5.9.
In my case, that problem was caused because I use conda-forge channel and qt is in 5.6 version there. When explicitly install qt=5.9 from default channel the problem was solved without change .bashrc file.
I soleved it by upgrading and installing pkg-config
sudo apt upgrade && sudo apt install pkg-config
AND Jupyter series just works well!
Related
I recently downloaded and installed Python 3.9 because I wanted to run a website scraper to more easily organize recipes found online. However, when I try to run pip it says it doesn't recognize it (and I have tried editing the path but every video or site I find has different information).
Even a basic check of my Python version comes back with no results:
I have uninstalled and reinstalled Python 3.9 but to no avail. There is also no scripts file within my python file and my computer doesn't even seem to recognise that Python is installed.
In python 3.9 you can add below path(scripts path) to your environment variable
C:\Users\ASUS\AppData\Local\Programs\Python\Python39\Scripts
Once the path is added, open a fresh CMD window and type pip --version.
You can see your pip version pip 20.2.4
I found that for Python 3.9 if you enter the command as py -m pip install, the installation initiates as expected.
Annotation 2021-06-17 121518_install pywinauto Visual Studio Code terminal
I finally can use pip install.
Here is how I do it:
Run python 3.6.9-adm64.exe
Choose Modify
Tick all boxes and click Next
Tick [Create shortcuts...appplication](not important) and Add Python to environment variables and click Install
Now run CMD and type:
py -m pip install (name) //pygame for example
Now I installed pygame easily.
I have fixed this issue by running apt-get install python3-pip
on my Debian Linux.
every video or site I find has different information
This may be due to the fact that those sites provide information for different Python versions.
As Alfie Hanks already pointed out in the comments: The right way to do it is to check the box Add Python 3.x to PATH when installing Python 3 for the first time. When re-running the installer / re-installing choose "Modify" and check the box Add Python to environment variables. That takes care of setting the correct environment variable so that the Python and pip binary can be found by Windows.
If you have trouble finding those options, take a look at circlepi314's answer to a similar Python question: https://stackoverflow.com/a/54029728/6710751 This one has screenshots of the installer where those options are marked.
Install python again and when the prompt window opens, click on the modify button. Then check if pip is checked. If not then check it and then proceed with the install.enter image description here
If it still doesn't work, simply uninstall python. And then when you reinstall it make sure that the ADD to path checkbox is checked.
I had the similar problem, I managed to solve it with the following:
I installed python 3.9 by Brew on my Mac, so the pip3 was broken
I resolved by uninstalling python3.9 and installing 3.8
Has anyone had this problem: when trying to install python>=3.6.6 by typing sudo apt-get install python>=3.6.6, to get another version? I get 3.5.3 and I do not understand why it happens so.
Could anyone help?
Thanks!
The version of python installed through apt is determined by the configuration in /etc/apt/sources.list. You can modified it to add additional sources but it is not recommended to do so since it may cause unexpected problems. A more safe way is to use anaconda or miniconda to manage your python environment. You can install any version of python through conda. Refer to this tutorial.
wxPython 3.0 is not available from pip; They say download it from Sourceforge. The installer from Sourceforge, however, fails with a meaningless error message:
I have tried brew install wxpython, and it installs fine, but Conda Python doesn't pick it up and continues to use the latest version (4) installed via pip.
What can I do?
The solution which I found thanks to Mike Driscoll and nekomatic:
Create a new conda env with Python 2.7.
Install https://anaconda.org/bjornfjohansson/wxpython .
conda install python.app
Use pythonw instead of python.
The last two steps are probably specific to macOS.
I am new at Python and Ubuntu. I really struggle to decide the best way of installing Python packages on Ubuntu. I am using VIM so I cannot use Anaconda since they do no "talk".
I have two options:
Install with: pip3 install --user foo. This works find but according to python4astronomers you should never use --user. It will work very bad.
Use apt-get but then I got old packages
Use sudo pip, but that can get bad code into my system.
I do not want to use virtual environments. I want to be able to use all packages I have installed when I use Python. I normally use Jupyter.
I find it strange that Python installation is so difficult on Linux compared with Windows.
Which of these is the correct way?
I recently used homebrew to install pyqt (along with qt & sip), but get an import error whenever I try to import PyQt4 in Python 3 (which was also installed using homebrew). To confuse matters more, I am able to import PyQt4 on Python 2 via the terminal.
I'm totally new to working with Python packages and, with that, totally confused. Any thoughts on how I might be able to undo what I did and reinstall so that I can access PyQt via the usr/local/python3 installation?
Thanks in advance!
brew reinstall pyqt --with-python3 will get you sorted!
There will be seperatelibrary files for python2 and python3. From your question, it seems that you have installed pyqt for python2 which you can't import in python3.
For python3, you have to install specific package developed for python3.
Here is a similar question regarding python3 pyqt installation using homebrew. It says, there is currently some limitation with homebrew.
Install pyqt via homebrew with `--with-python3` but still goes to Python 2
EDIT:
Developer of homebrew has resolved the issue.