Getting below error while installing Cheetah package (Cheetah-2.4.4) with python 3.4.3
Traceback (most recent call last):
File "setup.py", line 10, in <module>
import SetupTools
ImportError: No module named 'SetupTools'
Tries many ways resolving this but no luck. Can any one pls help me what is missing here.
This should be fixed in Cheetah 3, released today. Cheetah3 works with Python 3.3+.
Use pip install Cheetah for python 2.x and pip3 install Cheetah3 for python 3.x
Related
I'm on Windows using PowerShell and I'm trying to run a python script that calls another script that imports msgpack. My msgpack version is 1.0.2.
> python3 .\testing.py
Traceback (most recent call last):
File "C:\<path>\testing.py", line 1, in <module>
import b0RemoteApi
File "C:\<path>\b0RemoteApi.py", line 7, in <module>
import msgpack
ModuleNotFoundError: No module named 'msgpack'
I solved the issue. For anyone else who had this problem, I had two versions of Python installed, 3.8 and 3.9. msgpack was installed in the 3.8 directory and PowerShell was using Python 3.9, so I uninstalled the older version and reinstalled msgpack.
I have a Mac 10.6.8 with Pycharm 3.0.3 installed
When I install the cvxopt packege via terminal:
pip install cvxopt
and then i import the module I get the following:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cvxopt/init.py", line 242, in
cvxopt.base.normal, cvxopt.base.uniform = normal, uniform
AttributeError: 'module' object has no attribute 'base'
I ve been trying several solution but no luck
Any help please?
Thanks
Because you have python 3 this isnt working, you’re using the python 2 pip. To use the python 3 pip try pip3 install.
I have python2.7 and python 2.6 installed in my VM and I pip install some libraries such as:
sudo pip install gsconfig
The installation is successful and I can see that the package is installed by:
pip list
My default system's python is 2.6. In the terminal I enter python and try to import the library as:
python
import gsconfig
And then I get an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gsconfig
I also tried with python2.7 as:
python2.7
import gsconfig
I get the same error message. I can not understand why this is happening as I don't have with other packages this issue (e.g. simplejson).
Can it be that the location of the package is different?
When I try this:
which gsconfig
I get:
/usr/bin/which: no gsconfig in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
EDITED
Also when I go to the site-packages folder of python2.7 I can see that the package is installed.
It looks like the package name is not gsconfig, but is something else.
Looking at the documentation, I think it's geoserver.
Here is my problem:
After I managed to install anaconda (having python 3.4), I apparently managed to install pybrain too. But when i use 'import pybrain' from anaconda or from the terminal too I get this error:
>>> import pybrain
Traceback (most recent call last):
File "<ipython-input-2-0fb7233d2a8c>", line 1, in <module>
import pybrain
File "//anaconda/lib/python3.4/site-packages/PyBrain-0.3-py3.4.egg/pybrain/__init__.py", line 1, in <module>
from structure.__init__ import *
ImportError: No module named 'structure'
Simply running sudo pip3 install git+https://github.com/pybrain/pybrain.git worked for me after having the same issue.
The version up on PyPi isn't Python 3 compatible.
Installing the latest commit directly using pip3 should take care of your old package (from PyPi) as well.
I have different python versions installed on my ubuntu machine. The default version is 2.7.
I'm trying to install nfqueue module for version 3.4:
#apt-get install libnetfilter-queue-dev
#pip3 install NetfilterQueue
When I try to test if it is correctly installed I get this error:
>>>import netfilterqueue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python3.4/dist-packages/netfilterqueue.cpython-34m.so:undefined symbol: PyString_FromStringAndSize
Has any one an idea what would be the problem??
Thanks!
The function PyString_FromStringAndSize doesn't exist in python 3.x... you need to make sure you're installing the correct nfqueue module