Import error:Pyqt - pyqt

While installing pyqt in windows 7 gives error:
D:\pyqt>python configure.py install
Traceback (most recent call last):
File "configure.py", line 32, in
import sipconfig
ImportError: No module named sipconfig
How to rectify this ?

It appears you are trying to build PyQt from source. Before you can do that, you must build and install SIP (clearly stated on the PyQt4 and PyQt5 download page)
You can obtain the SIP source code from riverbank computing (see here). You will then need to build SIP before you can build PyQt.
Note, since you are on windows, you probably dno't need to do any of this building, and can just install from the precompiled installers which are available on the download pages I linked to above.

Related

Python, pymesh install problem on windows10

Hi I'm a Python newbie trying to program python using pymesh library but I cant get it to install properly.
Accordijng to attached image I have installed it, and the package says its for 3.8.x and I have python 3.8.2 installed.
pymesh installation instructions (https://pymesh.readthedocs.io/en/latest/installation.html) say to run a test after installing the package. The test fails.
(work) (base) D:\Downloads\HoleCutter>python -c "import pymesh; pymesh.test()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'pymesh' has no attribute 'test'
I dont have the resources/capability to 'build packages with cmake'
screen snap from command prompt window
The reason is the PyMesh library isn't kept up to date on PIP, instead you have to use Docker or compile it yourself. This problem is covered by the following issue on Github, however no action has been taken for years: https://github.com/PyMesh/PyMesh/issues/94
Have you tried "pip install pymesh" or "pipx.x install pymesh"?
I think the instructions in the link you provided are for Linux and Mac OS. You can look at this link: ImportError: No module named PyMesh

How to get python API to access Smartsheet

I am following the smartsheet API's python-sdk example to do some practice.
Below are my steps (using Python 3.4.4 on macOS 10.7.5):
installed the SDK package from their GitHub repo
installed pip using pip install smartsheet-python-sdk in my terminal
created a .py file and moved it into the SDK file
Issue
When I run it, I got following error message:
Traceback (most recent call last):
File "/Users/canny_aiyaya/Desktop/smartsheet-python-sdk-master/smartsheet/charity.py", line 5, in <module>
import smartsheet
File "/Users/canny_aiyaya/Desktop/smartsheet-python-sdk-master/smartsheet/smartsheet.py", line 28, in <module>
import requests
ImportError: No module named 'requests'
Code in the .py file
import smartsheet
ss_client = smartsheet.Smartsheet(access_token)
ss_client.errors_as_exceptions(True)
Analysis
I looked for some possible solutions, and try to install requests on my terminal using sudo pip3 install requests, but it shows:
No matching distribution found for requests
This is my first time trying to use API on Smartsheet, any supports/links/videos will very helpful.
There are a number of dependencies. You can run python setup.py install from the Smartsheet SDK directory to install them.

python module not found error

This question has been asked a few times, but the remedy appears to complicated enough that I'm still searching for a user specific solution.
I recently installed Quandl module using pip command. Even after successful installation my python idle is still showing
Traceback (most recent call last):
File "F:\Python36\Machine Learning\01.py", line 3, in <module>
import Quandl
ModuleNotFoundError: No module named 'Quandl'
I have used import command in my code.
I am using python 3.6.1 version.
I am working on a windows 10 Desktop.
I have also tried re-installation of module.
You can better navigate to your python scripts folder and open a command window there and try pip3 install quandl .Hope this helps.

RISCV debug tests - 'gdbserver.py' fails for missing module

When I try to run the following in the /riscv-tests/debug directory
it fails.
./gdbserver.py --spike64 --cmd ../../bin/spike
Traceback (most recent call last):
File "./gdbserver.py", line 10, in
import targets
File "/home/dave/MyProjects/RiscV/build/riscv-tools/riscv-tests/debug/targets.py", line 4, in
import testlib
File "/home/dave/MyProjects/RiscV/build/riscv-tools/riscv-tests/debug/testlib.py", line 9, in
import pexpect
ImportError: No module named pexpect
I have searched the entire RISCV installation for "pexpect.py" with no success. I installed the complete RISCV toolchain. I can build code and run
the ISA simulator using spike and pk.
Looks like the problem is with my python installation. I found 'python-pexpect' in my Linux package manager and installed. But I am now having errors with other python system libraries.

Python3.2 PyQt4 installation: UnboundLocalError

Recently I upgraded my Ubuntu to version 11.10 so I had to reinstall python3 modules. I downloaded latest PyQt4 but when I run configure.py I get following error:
Qt Designer plugin disabled because Python library couldn't be found
An internal error occured. Please report all the output from the program,
including the following traceback, to support#riverbankcomputing.com.
Traceback (most recent call last):
File "configure.py", line 2269, in <module>
main()
File "configure.py", line 2254, in main
subdirs=pyqt.qpy_libs() + pyqt_modules + xtra_modules + pyqt.tools(),
File "configure.py", line 957, in tools
link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
UnboundLocalError: local variable 'lib_dir_flag' referenced before assignment
I really haven't got a clue what is wrong. btw. Before I upgraded Ubuntu to 11.10 I used python3.1 and everything was fine.
Make sure you have the correct sip packages installed before you try to build PyQt4. For ubuntu, I think you will need the python-sip-dev and python3-sip-dev packages (plus any dependencies). Alternatively, you could download and build the latest version of sip from source.
When you run the configure.py script for either pyqt or sip, it is essential that you use the correct version of python, e.g:
/usr/bin/python3.2 configure.py

Resources