Having Trouble Installing Python Packages With pip
Asked Answered
F

2

6

I am relatively new to python and trying to install the base64 package through my cmd (that is system32/cmd.exe <- not sure if this is relevant).

I am using python 2.7.12 64 bit pip 9.0.1

My code is:

pip install base64

My error is:

Could not find a version that statisfies the requirement base64 (from   versions : )
No matching distribution found for base64  

I was successfully able to install the datetime package, but I received the above error when trying to install pprint. So it is not directly related to base64.

Will be happy to post any other needed information at request, please give me a general idea how I can track down the information needed to solve this problem.

Fania answered 11/11, 2016 at 16:26 Comment(1)
base64 is built into the core python distribution (docs.python.org/2/library/base64.html). datetime is the same. You shouldn't need to install it with pip.Elasmobranch
E
20

The pip error message means that the package was not found. Typically that means the package name is not correct. In your case, the package is imported import base64 but the actual package name is pybase64: pip install pybase64

In similar cases you can find the correct package name by using google, for example with 'install base64 python'

Epicotyl answered 16/2, 2018 at 10:49 Comment(1)
This seems incorrect. pybase64 is just a wrapper around original Lib/base64 developed by a third party developer claiming better performance pypi.org/project/pybase64 Original base64 library ships alongside core distribution. Example; github.com/python/cpython/blob/3.7/Lib/base64.pyRemiss
K
0

As other users noted, the root of the error is that base64 is a built-in module that comes with Python3 so there is no need to pip install it.

https://docs.python.org/3/library/base64.html

import base64 at the top of the file will be sufficient.

Koran answered 14/1 at 17:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.