shiboken2 & PySide2 issues - user-interface

I get this error when trying to run a PyQt5 Application, I keep getting it and I think it's when I use pyuic5 to export code from QT Designer and then try to run it.
from .shiboken2 import *
ImportError: DLL load failed: The specified procedure could not be found.
I have used pip freeze to find the versions of shiboken2 and pyside2 and they are both the same version.

I installed Python 3.7 + And it works.

Related

Pycharm doent recognize numpy package from previously created conda environment

im using Pycharm 2022.2.3.
I have Anaconda Navigator 2.3.2. Created in anaconda a new virtual environment based on python 2.7 called testpy2. Added the numpy package needed to execute a code. I did it from Ananconda Navigator GUI. The installation was succesful. I could see now numpy in my installed package list.
Open Pycharm project, select as interpreter the existing conda environment test2py.
The code is:
import random
import numpy as np
print "Hola"
The problem is it give the error: ImportError: DLL load failed when importing Numpy.
So I cant execute the program because of numpy.
When i go to see the packages something similar to:
then i got stuck in loading. Pycharm should recognize and load all the packages in the conda environemnt as shown in the image above, but in my case i got stuck in loading.
Im running on Windows 10 and i dont have any python installed at all
Any help would be apreciated.

Rdkit - ImportError: DLL load failed

I have used pip install rdkit-pypi to install rdkit library. But when I type import rdkit as rd, it shows the error
ImportError: DLL load failed while importing rdBase: The specified module was not found.
I am using Anaconda as a base. What should I do to work with rdkit library?
I previously encountered this problem. After some reading, I came to know that the python version above 3.8.0 would not be compatible with rdkit. Even you need to change your base to rdkit.
I solve this by first downgrading the anaconda version with the python version lower than 3.8.0.
then I set my rdkit environment.
In this image u can see my python version and I'm not getting any error
In second image u can see my base to my-rdkit-envs

kmpfit module not in Kapteyn v2.2 module list

I am using Python 2.7 through Anaconda 2.7.8 and need Kapteyn 2.2 to perform Non-linear Least Squares fitting easily (it is probably an alternative to Scipy.optimize.leastsq() for dummies like me!).
After copy-pasting this from a previous post here on Stack Overflow:
conda install -c https://conda.binstar.org/dhirschfeld pyodbc
and then running on my cmd (as I did not have pyodbc installed I think, because of which maybe the command prompt on my Windows 7 64-bit system was not responding well to python setup.py install inside the Anaconda directory where I unzipped the Kapteyn .zip file downloaded from University of Groningen website.
But, after the installing pyodbc properly and running python setup.py install, the cmd gave me an error saying error: command 'C:\Users\windows 7\Anaconda\Scripts\gcc.bat' failed with exit status 1. Later, when I tried to import kmpfit module (needed for Non-linear least square fitting with Kapteyn), here is the problem:
import kapteyn
help(kapteyn)
Help on package kapteyn:
NAME
kapteyn - Kapteyn package.
FILE
c:\users\windows 7\anaconda\kapteyn\__init__.py
PACKAGE CONTENTS
_ni_support
celestial
doccer
filters
interpolation
maputils
mplutil
positions
rulers
shapes
tabarray
wcsgrat
DATA
__all__ = ['celestial', 'wcs', 'wcsgrat', 'tabarray', 'maputils', 'mpl...
__version__ = '2.2'
VERSION
2.2
As you can see, there is no module named kmpfit (or even wcs) here. But according to http://www.astro.rug.nl/software/kapteyn/intro.html, these two should be there.
Kindly help. I have never imported any module before.
Thanks in advance...:-)
I just managed to get this working (on Mac OSX, so you may have to adjust this). My steps were:
$ conda install pyodbc (didn't need to go through binstar)
Download & unarchive the kapteyn package, then navigate to its directory
$ python setup.py install, which used my OS's C compiler and Anaconda's python, and installed kapteyn to my anaconda distro's site-packages, as it should.
Check that kmpfit.so is in the kapteyn folder in site-packages, showing that kmpfit installed correctly.
>> from kapteyn import kmpfit failed, ImportError: cannot import name kmpfit. I did some digging and discovered that it was still importing kapteyn from the folder that I downloaded, not from site-packages.
Delete the downloaded kapteyn folder, then try again. It worked!

ImportError: cannot import name make_pipeline

I keep getting and error when trying to test machine learning code on Python http://scikit-learn.org/stable/auto_examples/feature_selection_pipeline.html#example-feature-selection-pipeline-py.
I'm using windows 8.1. I've downloaded spyder and anaconda with python version 2.7.
I can run other examples fine, but whenever something uses pipe I get the error:
ImportError: cannot import name make_pipeline.
I'm using the latest development version of scikit-learn.

Problems setting up pySDL2 on mac os x 10.9

I am having trouble setting up PySDL2 on my macbook pro running OSX 10.9. I downloaded and installed SDL 2.0.1 and I am trying to follow the PySDL2 tutorial here: http://pysdl2.readthedocs.org/en/latest/integration.html
I do not know what to do when it says "it is also possible to set the environment variable PYSDL2_DLL_PATH, which shall point to the directory of the SDL2 library." I tried running "export PYSDL2_DLL_PATH=/Library/Frameworks", but I don't know if that's what I'm supposed to do. Currently when I try to run this code:
import sys
try:
import sdl2.ext as sdl2ext
except ImportError:
import traceback
traceback.print_exc()
sys.exit(1)
from sdl2.ext import Resources
RESOURCES = Resources(__file__, "resources")
I get the error "ImportError: No module named 'sdl2'"
So how do I properly set this up?
Edit: Using macports I got things setup correctly. Thank you sirs.
Have you tried installing it via macports?
$ sudo port install py-SDL

Resources