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".
Related
So I was using Python IDLE to create my codes, created an environment variable to run the code from run window outside of idle and it was working fine. Recently I downloaded Anaconda for a class and when I try to run a code from outside of idle I get the below message error. Is there a way to change the directory which python is looking for packages to a different path as I assume once I downloaded Anaconda the path has changed. I appreciate you help.
Here is my traceback
File "C:\Users\h.omail\MyPythonScripts\RFQs.py", line 1, in <module>
import os, os.path, docx, win32com.client, shutil, send2trash, PyPDF2, textract, re, pprint
File "C:\Users\h.omail\Anaconda3\lib\site-packages\docx\__init__.py", line 3, in <module>
from docx.api import Document # noqa
ImportError: DLL load failed while importing etree: The specified module could not be found.
pip install python-docx
OR
pip3 install python-docx
I downloaded multiple modules (Discord API, cx_Freeze) (pip download, Windows 10) and now I wanted to use them.
But when I want to import them, it says there isn’t any module.
From my former Python using (before resetting computer) I‘ve added a pycache folder and it worked for one module. I‘m not able to reproduce it for other modules. What to do?
I‘ve only one Python version (3.6.5) on PC.
I‘ve checked the \site-packages folder and they‘re there.
If you are using python3 then try downloading the library using
pip3 install libname
but if you are using python2 then install the library using
pip2 install libname or just pip install libname
try with these command and reply
try installing your library using the command prompt in normal user and with the admin user so that you will get to know that what is happening and also if it is still not working then try installing the library into the same folder of your project using pip custom install command
pip install -t <direct directory> <package>
then use the import statement
For Example I used
pip2 install -t c:\Users\Nav\Desktop\projectss cx_freeze
then i imported the library using
#from cx_Freeze import setup, Executable
import cx_Freeze
from cx_Freeze import *
it worked.
Previously i was getting error like :
File "C:\Python27\lib\site-packages\cx_Freeze\__init__.py", line 10, in <module>
from cx_Freeze.finder import *
ImportError: No module named finder
After custom install it is working
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.
I installed the python-docx package and have verified that it exist using the pip command Freeze. When I use that command it shows docx==0.2.0 but when I try to import it in my script I get a ImportError: No module named docx, any ideas whats going on.
Try setting your PYTHONPATH environment variable.
http://docs.python.org/2/using/cmdline.html#envvar-PYTHONPATH
If you need to find where pip is, you could try the locate command if you're on Linux.
http://www.computerhope.com/unix/ulocate.htm
http://linux.die.net/man/1/locate
My python version is: Python 2.7
I did an easy_install mechanize then I tried running a script and I'm getting this:
File "test.py", line 2, in <module>
import mechanize
ImportError: No module named mechanize
If you need any other information let me know.
Try this in case pip or easy_install, for whatever reason, aren't working:
Download the source code from http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz
Unzip the package, go to the command line, change into the folder that was extracted and type:
python setup.py install
If you're on Linux/Mac, you may need to type the following:
sudo python setup.py install
Would like to add something for some future users:
In case some of the users get the error "No module named '_version'"
Mechanize however doesn't support Python 3 so you should install a Python 2.x release (the latest available is 2.7.3), install the mechanize package there and then retry running your script.