4

I have just installed a bunch of packages to use MySQL on python, but I'm not sure which one did the trick (whichever it was, only worked after a reboot).

Now I'm trying to use it on a virtualenv, so I created a requirements.txt with pip freeze on my local machine, then, I created a virtualenv and tried pip install -r requirements.txt. However, can't install any of the packages, and the error is:

Could not find a version that satisfies the requirement mysql-connector-python<=2.0.4 (from -r myvi/requirements.txt (line 1)) (from versions: )
No matching distribution found for mysql-connector-python<=2.0.4 (from -r myvi/requirements.txt (line 1))

Tried editing the file manually, but whatever the first line is, always report the same error.

Googling the subject, I've only found solutions that are particular to the packages, but I get errors for regardless of the package. Why is this happening?

EDIT: I thought that all the packages were raising error, but only some of them are. Namely:

adium-theme-ubuntu==0.3.4
mysql-connector-python==2.0.4
Pyste==0.9.10
unity-lens-photos==1.0

I thought that if it was built by pip freeze , it would be possible to pip install it.

jwodder
  • 54,758
  • 12
  • 108
  • 124
Nilo Araujo
  • 725
  • 6
  • 15
  • can you show us the content of your requirements file? (just a few lines) – Gabriel Belini May 31 '17 at 15:32
  • try this https://stackoverflow.com/questions/34489271/i-cannot-install-mysql-connector-python-using-pip – tom May 31 '17 at 15:32
  • `adium-theme-ubuntu==0.3.4 cycler==0.10.0 mysql-connector-python==2.0.4` (...) – Nilo Araujo May 31 '17 at 15:35
  • Can you `pip install` anything? If the answer is no, I think its either a proxy problem (if you need a proxy) or a SSL certificate problem. Discussed here: https://github.com/Homebrew/legacy-homebrew/issues/41253 – Martin Burch May 31 '17 at 15:37

1 Answers1

1

I don't know how you installed mysql-connector-python before, but its PyPI page doesn't list any downloadable files for any of its versions, so you can't install it with pip (at least, not with a plain pip install mysql-connector-python==2.0.4 or the like). Try just deleting the mysql-connector-python line from your requirements.txt file.

The other packages you've mentioned (adium-theme-ubuntu, Pyste, and unity-lens-photos) don't even exist on PyPI, so pip install definitely won't work for them.

jwodder
  • 54,758
  • 12
  • 108
  • 124
  • Not all packages from pip freeze can be installed by pip instal, that one included, thus, the error. Add that to your answer and I'll accept it. – Nilo Araujo May 31 '17 at 15:46