0

I'm new to python, about a month.

I know installing python modules can be done by using pip or easy_install. But when I was trying to install the regex module it gave me an error.

Typing pip install re in cmd gave me the following errors;

ERROR: Could not find a version that satisfies the requirement re (from versions: none)

ERROR: No matching distribution found for re

So I went to PyPI and downloaded a file there and now PyCharm doesn't give error when I import the module anymore.

So are there any difference between these ways of downloading Python modules or it doesn't matter ?

I'm using Windows 10 and have Python 3.8 and 3.8.1.

asked Jan 30, 2020 at 3:16
1
  • re is included in the python standard library. Why are you trying to install it with pip? Commented Jan 30, 2020 at 4:04

2 Answers 2

1

re is a built-in module, therefore you are not required to install this with pip.

Python Built-In Modules

answered Jan 30, 2020 at 3:28
Sign up to request clarification or add additional context in comments.

Comments

0

re is part of the Python standard library so there is no need to install it separately. There are many ways to 'install' a package, e.g. using easy_install, pipx, venv, poetry, etc., but pip install --user is likely the way you're going to want to go to get started until you run into a compelling reason to explore other options. Either way, all these tools are essentially just various ways to move packages into PYTHONPATH, the place that Python looks for packages by default.

answered Jan 30, 2020 at 3:27

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.