3

I am running the Amazon Linux AMI release 2018.03.

I am attempting to use virtualenv with Python 3.6.

I am using Pip 18.0. (also tried downgrading to pip 9.0 series)

I create a new environment using:

$virtualenv-3.6 project_new
Using base prefix '/usr'
New python executable in /srv/project_new/bin/python3.6
Also creating executable in /srv/project_new/bin/python
Installing setuptools, pip, wheel...done.

This all appears to work, I then activate said environ:

$source project_new/bin/activate
(project_new)$

This also works... then I list out the packages in the virtualenv:

$ pip list
Package    Version
---------- -------
pip        18.0
setuptools 40.2.0
wheel      0.31.1

This all looks normal. Then I try to install a new package (ex. mysqlclient):

$pip install mysqlclient
Collecting mysqlclient
  Downloading https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz (90kB)
100% |████████████████████████████████| 92kB 3.8MB/s
Building wheels for collected packages: mysqlclient
  Running setup.py bdist_wheel for mysqlclient ... done
  Stored in directory: /home/user/.cache/pip/wheels/71/9b/6f/a8c79bceb4a35f4acf49363883f958f31b113470a3b504df87
Successfully built mysqlclient
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.3.13

And this is where it "gives me the lie"!

$ pip list
Package    Version
---------- -------
pip        18.0
setuptools 40.2.0
wheel      0.31.1

Where is my package?? There are no error messages all looks good but the package never installs!?

I have also tried:

$ /srv/project_new/bin/python -m pip install mysqlclient

Same result, nothing gets installed. Is there a way I can see where pip is putting this package... if anywhere?

EDIT 2018-09-08: So I have solved my own problem... I dumped the Amazon AMI image and moved over to Ubuntu... I am not selecting this as a solution since it was such a severe option, but time dictated this as the fastest path forward rather than fighting through these issues and the RPM hell that took over the image.

Zexelon
  • 495
  • 5
  • 18
  • have you tried `pip install -v`? – derelict Sep 08 '18 at 02:07
  • Yup, lists out all the details of where its getting the file, /tmp setup directories etc... but still ends off with `Successfully installed mysqlclient-1.3.13` but it does not install. Again, no error message, just plain doesnt work. – Zexelon Sep 08 '18 at 02:39
  • Is MySQL installed in your system? – Laurent LAPORTE Sep 08 '18 at 06:33
  • 1
    Yes, a good question, but yes it is installed. Ironically I had mysqlclient in a couple of other virtualenv's and working fine, but I can no longer install anything in any virtualenv. Also when I removed mysqlclient from the existing virtualenv, it would not install back, exact same issue as above. It would say "Successful" but it never actually installed. – Zexelon Sep 09 '18 at 03:38
  • Having the exact same issue. Why the heck is this happening?! – Logan Yang Jul 21 '19 at 16:29
  • Is it also on a Amazon AMI version? – Zexelon Jul 22 '19 at 18:03

0 Answers0