How to install mechanize in python 3.4 on windows 8.1
I tried pip install mechanize
It had a few syntax errors in installation but finally it said Completed Successfully
Still import mechanize doesn't work
It says No module named 'mechanize'
From mechanize FAQ :
Which version of Python do I need?
Python 2.4, 2.5, 2.6, or 2.7. Python 3 is not yet supported.
But you could have a look to this other recent post from SO I get an error in python3 when importing mechanize if you want to test the version in developpement for python3.
By the way, did you try googling "mechanize python3" before asking on SO ?
If you have both python 2.X.Y and 3.z on your machine you will also have both pip and pip3 you may have installed machanize for python 2 rather than python 3.
Try:
pip3 install mechanize
try running
py -m install mechanicalsoup
it worked on my Windows 10 with Python 3.6
Good Luck
Related
Probably stupidly I tried to install the latest version of Python, in this case using the download from python site, but after doing that I was then getting python still running on the previous version python-3.6. I'm on OSX and was using sublime.
So I have been trying to work out how to update it to use the newest version. I've followed; https://opensource.com/article/19/5/python-3-default-mac.
All of the responses to queries now point to the python-3.9.5 version. So that's great and my runtime is using that. However after installing the requests using pip install I get the following error when running.
import requests
ModuleNotFoundError: No module named 'requests'''
[path: /Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
I stumbled upon Modules are installed using pip on OSX but not found when importing which I have been trying to work through.
I have been able to run the import command successfully in terminal, however it's intermittent as I've tried again and it's broken, so I'm lost. I'm running it something trying to run the python3.6 version, which after updating I followed these instructions to remove when I have uninstalled that from my mac https://www.macupdate.com/app/mac/5880/python/uninstall.
If there is any ideas, would love some help, mainly to try and tell me what that error message is telling me.
In particular, what does this mean?
[path: /Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.6/
I should clarify too; when I run 'pip list'
I see
requests 2.25.1
Assuming that you are not installing requests package properly, and assuming your python executable is named python:
python -m pip install requests
If however, your python executable is named something else instead, e.g. python3, replace python with that name:
python3 -m pip install requests
That is what I get when I try to pip install http.cookiejar
My Python version is 3.6.2, my pip version is 10.X, my OS is Windows 8.1 64 bit, other modules installed without issues.
I searched my error output on stackoverflow and it seems I first run into this problem
How to fix that?
http.cookiejar is a module from stdlib, you don't need to install it.
I'm having trouble installing beautifulsoup 4.6 for python 3.6 on my 2012 macbook air. For some reason beautiulsoup works just fine on python 2.7 which comes preinstalled in the mac, however when I try to use/install it for python 3.6 it simply won't do it. Is there any way i can bypass the builtin python 2.7, and install the package for 3.6?
Below is a picture of the error message in Python 3.6 when I try to run the code
>>> from bs4 import beautifulsoup
picture of the error message in python 3.6
just install it for python3
pip3 install bs4
if that didn't work then you should provide more info.
I try to install opencv for python. I use windows x64. I install numpy1.6 and python2.7. I have installed opencv2.4.9. I install them succesfully. I guide from this page. It says that
Now open your "Python IDLE" ( from Start > All Programs > Python 2.7 > Python IDLE ) and just type following :
import cv2
When I run import cv2, I get below error :
module compiled against API version 9 but this version of numpy is 6.
How can I know compatible version?
I know this question enter link description here. But I installed latest numpy version, it didn't solve my problem.
Use https://www.scivision.co/install-opencv-3-0-x-for-python-on-windows/
It's going to lead you to http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv where you can download a .whl installer. After you download it, you can run it using
pip install some-file.whl
assuming you have pip installed. After that you should be able to import cv2.
I had the same problem and I did a ton of research but this is the only one that worked.
I had 64-bit Python at first, then I installed BeautifulSoup using easy_install.
For some reason, I uninstalled 64-bit Python using this method. Then I reinstalled the 32-bit version from Python.org. However:
Kit:~ Kit$ easy_install beautifulsoup
Searching for beautifulsoup
Best match: BeautifulSoup 3.2.0
Processing BeautifulSoup-3.2.0-py2.6.egg
BeautifulSoup 3.2.0 is already the active version in easy-install.pth
Using /Library/Python/2.6/site-packages/BeautifulSoup-3.2.0-py2.6.egg
Processing dependencies for beautifulsoup
Finished processing dependencies for beautifulsoup
This is a nasty sign that I haven't really found an easy way to cleanly uninstall Python on OS X. Besides, it mentions BeautifulSoup for Python 2.6, but I have 2.7. Sad :(
How do I reset easy-install.pth? I couldn't find it on Spotlight.
Looks like you're running easy_install from the system Python 2.6. Apple ships easy_install with the OS. If you just installed Python 2.7 from python.org, you'll need to install distribute for that version. (Note that you'll need to do this as root so it can write to /usr/local/bin.) There are also Python version-suffixed easy_install versions, e.g. easy_install-2.6, so if for some reason you want to install a package in the system Python, then you can still do so.
Also, investigate pip which has an uninstall feature.