moduleNotFoundError: No module named 'aws_cdk' python windows - python

I keep getting the same error of aws-cdk not being able to run on the code. I first thought it was case sensitivity but that did not solve the issue. I think it may be a path location issue but I have already done the installs through npm and the pip install of the requirements txt. I'm not sure what I am doing wrong.
Code:
#!/usr/bin/env python3
import os
from aws_cdk import core as cdk
Terminal:
File "C:\Users\aliai\Desktop\rekognition-video-people-blurring-cdk-main\my-project\app.py", line 4, in
import aws_cdk as cdk
ModuleNotFoundError: No module named 'aws_cdk'

You should install aws_cdk module via pip, according to docs:
https://docs.aws.amazon.com/cdk/v2/guide/work-with-cdk-python.html

Related

Issue installing zenipy, ModuleNotFoundError: no module named 'gi'

I'm trying to import zenipy for windows 10 after reading and experiencing that zenity-python simply will not work. So I installed zenipy and got the 'successfully installed' message from the command line but now when trying to import it I get :
ModuleNotFoundError: No module named 'gi'
in PyCharm I am writing:
from zenipy import *
Please can someone help me to import zenipy and tell me what is going wrong?
Looks like it's not installed or don't have the dependencies that need. Try pip uninstall zenipy and then pip install zenipy.
Or download and install the repo on GitHub.
$ git clone https://github.com/poulp/zenipy.git
$ cd ./zenipy
$ python setup.py install

"Importerror: no module named zope.interface", but I already installed on my Centos 7

Why I cant run this code? I already have zope.interface I have try update the path but still doesn't work, I don't know why. See the image above:
import paho.mqtt.client as mqtt
from twisted.internet import reactor, protocol
from txws import WebSocketFactory
import json
If you installed with pip there's a good chance it broke the installation.
After installing the zope module using pip, for example: z3c.password, your zope installation breaks.
This is because pip installs the module in /usr/local/lib/python2.7/dist-packages/zope and the original module zope.interface is in /usr/share/pyshared/zope/interface/ and has minor relevance when importing.
To fix this I would try symlinking it like so:
cd /usr/local/lib/python2.7/dist-packages/zope
sudo ln -s /usr/share/pyshared/zope/interface/

Import media on python gives Import Error

Here is the piece of code:
from PIL import Image
from pygraphics import media
toy_story = media.Movie()
I get the following error:
ImportError: No module named 'Image'
If I comment out the from pygraphics import media line it works. But then I need the media package. what's going on here. I have installed all the required packages by doing pip install <module name>. If I comment out from PIL import Image I still get the same error. What is going on here?. I have looked at other similar questions on here. But none of them answer this question.
TL;DR import media doesn't work. It gives the error ImportError: No module named 'Image'. But I have already installed Image via PIL. Help!!
I am on a mac and using python 3.5.1.
In your terminal, run python3 -m pip install <module_name>. pip has likely installed the module for python2, which you can verify by running help("modules") in python2 and python3. Running pip -V will also tell you which version of Python pip is installing modules for.

Python - Tweepy Module - pip.req

When I am trying to install tweepy module for python on windows 7, I type in easy_install tweepy
and it gives me the error of:
ImportError: No module named pip.req
I already read the link below but I am a newbie and didnt understand it:
No module named pip.req
PLEASE HELP!!
You should look inside the file setup.py in your folder with downloaded tweepy.
There you could find the line:
from pip.req import parse_requirements
setup.py tries to import parse_requirements function from module req from package pip.
But inside tweepy folder there are no pip package with req.py python module. Read about Python packages and modules here.
So you need to do the steps from the answer https://stackoverflow.com/a/25193001/821093 to fix it.
You can do a simply one line command as suggested by Tweepy installation
Or you can download the file yourself and put on your desktop (or wherever you like). From the windows command type:
cd deskstop\tweepy-master # tweepy-mast is defaul name from the zip download
python steup.py install
You can access the command prompt window using the "Window key" + "R" then type "cmd".

ImportError: No module named 'googlevoice'

python noob here. Just start picking up python few weeks ago and currently need some help. I have 3.3.4 python for windows 7 and I tried running this:
import urllib.request
from googlevoice import Voice
from googlevoice.util import input
import time
File "<pyshell#0>", line 1, in <module>
from googlevoice import Voice
ImportError: No module named 'googlevoice'
so I figured. no big deal, I just need to install the module. I obtained a setup.py file from the link below and ran the file in different directories. Then tried " import googlevoice" but still doesn't work. The github link isn't too helpful, in terms of installing this module. Please help? I think I just have not learned how to install modules properly. Last time it took me a while to install pygame module, but i think it was because of directory issues at first.
https://pygooglevoice.googlecode.com/hg/
http://sphinxdoc.github.io/pygooglevoice/examples.html
To install the PyGoogleVoice, you need to download the whole archive and execute:
python setup.py install
If you have pip install, you can also run pip install pygooglevoice, or easy_install pygooglevoice with EasyInstall, without having to download the source code.

Categories