Anaconda navigotor and its applications wont work - pyqt

Anaconda navigator along and its enclosed applications stopped working when qtpy4 package was inserted manually, clicking their .exe icons wont raise any errors as nothing happens.
But upon manual launch of
C:\ProgramData\Anaconda2\Scripts\anaconda-navigator.exe
or
C:\ProgramData\Anaconda2\Scripts\spyder.exe
Raised the attached error
Qtpy error
*It is worth mentioning jupyter-notebook.exe launched from
C:\ProgramData\Anaconda2\Scripts\jupyter-notebook.exe
Worked fine

A simple reinstall sufficed, turns out the problem was in pipeline for pyqt as it broke conflicting qt5 binding.
P.s Happened when I accidentally install qt4 package over already
existing qt5 package in anaconda.

Related

VSCode Jupiter notebook cannot resolve import for package installed in editable (-e) mode

I am using a Jupyter notebook running in VSCode to test some ideas for a work project and I am using a package that is in a private GitHub repo. I encountered certain conflicts with versions of jax and numpy and after some fiddling trying to fix the issues, I simply re-installed said package to make sure I was using the correct versions of all required packages. Everything seemed fine until I re-opened the notebook and found a bunch of Import "<package name>" could not be resolved Pylance.
The imports still work and the code runs, however, PyLance appears not to be "seeing" said package.
I am using a conda Python 3.8 environment and to re-install the package I ran
pip install -e . --force-reinstall
I have also tried un-installing and re-installing the package, as well as creating a brand new conda env, and then installing the package there. Neither of these options worked however and I was stuck with the same issue.
Upon inspection of what is in sys.path I saw a strange entry
'__editable__.<package_name>-<package_version>.finder.__path_hook__'
I know that a colleague (who does not have this issue) does not see anything similar and instead has the correct local path to the package.
I should also note that I have the Python extension enabled, which includes the Jupyter and Pylance extensions as well. I have tried re-installing those extensions as well and that did not solve the issue either.
Edit.
I will add that I only get this PyLance error in notebooks. If I open a regular Python file then all PyLance features appear to be working as expected.

Python, Anaconda & PyCharm multiple versions of Python3

I just installed Anaconda3-2019-10 on my MacBook.
I tried to make sure that my previous Python 3 version was totally uninstalled / removed from my system. Typing python3to the terminal didn´t work anymore.
After installing Anaconda and PyCharm (pycharm-community-anaconda-2019.3.3) I started a new Project to test everything. For that I selected to create a new Conda environment:
After I created the process I checked the Preferences and the "Project Interpreter". This is what I found:
I expected to find two interpreters 1.) my 3.7 Python version and 2.) the Conda environment just created.
Does finding 3 versions mean that I didn´t correctly deinstall Python3 before installing anaconda or is there anything that I don´t understand here?
Do I need both versions?
If not is there a safe way to remove one of them?
For removing Python3 from my system I did almost everythin suggested in numerous posts in Stackoverflow.
Upon creating a venv(virtual environment) you no longer need to worry about the existing interpreter. https://docs.python.org/3/tutorial/venv.html this might be of help.

installing packages in Anaconda stopped

i have been using Anaconda for installing python packages and so far it worked just fine.
Since today it doesn't ... I am able to select the package i want, in my case "python-docx", run apply, and anaconda finds the package. I am also able to start the installtion and it does something (at least the processing bar keeps running), but after a view minutes it stopps. But nothing has happened. The package is still marked as not installed and wound't work in the code.
I tried it with different packages, but it is always the same.
I also tried to install the package using the conda comment in the cmd-box but here i end up with the error "conda comment hast not been found".
Does anyone know what i can do ?

PySide2 application failed to start

I just tried to test the newly released version of PySide2 (5.11) on Windows 10, 64 bit version. But the "Hello World" example does not work. I am using Python 3.6 with PyCharm. The interpreter I use is from Anaconda. So I pip installed the PySide2 version and also tried to install via "conda install ..." the older version of PySide2. Both installations worked, but I get the same error message for both libraries.
The error message is popping up in a separate screen saying: "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: minimal, offscreen, windows."
So I definitely can see the plugin files in the correct folder. I tried reinstalling. Deleted everything and tried other IDEs. But nothing solved the problem.
Any help is appreciated.
Try This :
import sys,os
import PySide2
dirname = os.path.dirname(PySide2.__file__)
plugin_path = os.path.join(dirname, 'plugins', 'platforms')
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path
# code .......
# .......
If you run the app after having set QT_DEBUG_PLUGINS=1, you should get more info on what is the issue. In my case, I was getting:
QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/xxxxx/AppData/Local/py3/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
Such a folder does not exist on my machine.
There are a few tickets somehow related to a similar issue (not sure it is the same problem):
https://bugreports.qt.io/browse/PYSIDE-559
https://github.com/pyside/pyside2-setup/issues/57
https://github.com/conda-forge/matplotlib-feedstock/issues/2
https://github.com/conda-forge/qt-feedstock/issues/71
My current working solution is to remove PyQt, qt and sip anaconda packages, then to manually delete a relic qt.conf in the root folder of the environment. After that, the official PyPi PySide2 wheel works fine.
check whether you have this directory or not: C:\Users\your_user_name\anaconda3\envs\your_virtual_env_name\Library\plugins.
If you don't have it, copy the whole "plugin" folder from your PySide2 site-package.
Mine is in here: C:\Users\your_user_name\anaconda3\envs\your_virtual_env_name\Lib\site-packages\PySide2\plugins
and paste the whole folder to C:\Users\your_user_name\anaconda3\envs\your_virtual_env_name\Library

Fix MonoTouch install?

My MonoTouch install is screwed somehow (MonoDevelop won't even open).
So yesterday I deleted /Developer/MonoTouch off my Mac because that was the only directions I could find for uninstalling it. Today I tried reinstalling both it and MonoDevelop. Both installers ran fine, but I still have the same issue so I went to "uninstall" it again...and that directory doesn't exist this time.
Then I went to install an older version (2.6.7) and that installer tells me that I have a newer version already installed.
So....what do I do?
I am in a very, very bad mood because of all this right now. A months worth of work is now pointless unless I can get this running again.
EDIT
I finally got an older version of MonoTouch to install. Version 2.6.7 that was downloaded off of their site. Now when I run MonoDevelop I get an error that says "MonoDevelop requires the Mono Framework version 2.6.7 or later" and gives me the option to "Cancel" or "Download".
This is the error that I got that started this whole thing. I installed 2.6.7 but it doesn't recognize, and if I install 2.8 it just won't launch (icon bounces 3 times then does nothing, no error, no app).
EDIT 2
The other thing of note is that no matter how many times I install/uninstall/reinstall any version of the Mono Framework, nothing at all shows up in /Developer/MonoTouch.
I don't know how important that is, but considering something used to be there until this problem started I thought it worth mentioning.
Also since this problem started, I can no longer open any .xib files inside of Interface Builder. Whether that means one created in XCode or opening Interface Builder then creating a new View. Interface Builder runs fine, but as soon as I try to open any .xib it crashes with this error report.
I notice it says something about libxml2 in there which WAS installed yesterday and is probably the root cause of this...but I have uninstalled and reinstalled that as well with no luck.
You need to install Mono 2.6.7 or later, please download and install:
http://ftp.novell.com/pub/mono/archive/2.8/macos-10-x86/10/MonoFramework-2.8_10.macos10.novell.x86.dmg

Resources