no matching distribution found for http.cookiejar - python

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.

Related

Having issue importing requests and I assume it's my python runtime not being set correctly

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

No module named 'win32api'

In Python 3.4 from Anaconda, I created a program and it is giving me and import error each time I run it.
Using Spyder.
ImportError: No module named 'win32api'
I already have the pywin32 installed. And I can see the win32api.pyd under C:\Anaconda3\Lib\site-packages\win32
This is the import code on my program:
from tkinter import *
from tkinter import ttk
import tkinter.messagebox
import time
import requests #needs to be installed
import pymysql #needs to be installed
import csv
import win32com.client #needs to be installed
import datetime
This is the whole error:
File "C:\Anaconda3\lib\site-packages\win32com\__init__.py", line 5, in <module>
import win32api, sys, os
ImportError: No module named 'win32api'
This is the only instance of Python I have installed. I uninstalled everything else and installed only Anaconda.
Searching online I got to something that said that it could be a problem with the PYTHONPATH. But honestly, I have no idea what they are talking about.
So any noob help would be really appreciated.
I am using Windows 7 by the way.
Thank you
The installation for pywin32 must have failed, or it is not for same OS bit architecture (say anaconda 64 bit and pywin32 32 bit). I recommend
you uninstall pywin32,
check what bit version of anaconda you are using, then
install pywin32 for same version,
verify that the installer indicates 100% success and there are no errors flagged in the installer's log window (it's rare but something may fail and the installer doesn't know).
Then open a python console and type "import win32com".
If #5 fails to import win32com, then:
try installing a different version of python, for example from python.org
repeat steps 2 to 5 above but for new python instead of anaconda
Could be that anaconda distributors did something to the python interpreter (although I didn't think so), or that some libs aren't registered right (see answer https://stackoverflow.com/a/17061853/869951 for some more things to try).
This should work:
pip install pypiwin32
I had the same problem and solved it installing the module pywin32:
In a normal python:
pip install pywin32
In anaconda:
conda install pywin32
My python installation (IntelĀ® Distribution for Python) had some kind of dependency problem and was giving this error. After installing this module I never more saw it.
As mentioned by outforawhile in comment, simply restarting the laptop fixed this for me.
It may be that this is required for Windows to register the DLL.
try this before install pywin32
pip install pywinutils

Installing mechanize for python 3.4 on windows 8.1

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

Pylab after upgrading

Today I upgraded to Xubuntu 13.04 which comes with Python 3.3. Before that, I was working with Pyton 3.2, which was working perfectly fine.
When running my script under Python 3.3, I get an
ImportError: No module named 'pylab'
in import pylab.
Running in Python 3.2, which I reinstalled, throws
ImportError: cannot import name multiarray
in import numpy.
Scipy, numpy and matplotlib are, recording to apt, on the newest version.
I don't have much knowledge about this stuff. Do you have any recommendations on how to get my script to work again, preferably on Python 3.2?
Thanks in advance,
Katrin
Edit:
We solved the problem: Apparently, there where a lot of fragments / pieces of the packages in different paths, as I installed from apt, pip as well as manually. After deleting all packages and installing them only via pip, everything works fine. Thank you very much for the help!
I suspect you need to install python3-matplotlib, python3-numpy, etc. python-matlab is the python2 version.
You need to install all python libraries you installed for Python 3.2 also for 3.3.

Reset easy_install after uninstalling Python on OS X

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.

Categories