0

The following are the requirements I am trying to install:

Django==1.9.6
gunicorn==17.5
gevent
Flask==0.11
Flask-SQLAlchemy==2.1
Flask-OAuth==0.12
Jinja2==2.8
MarkupSafe==0.23
MySQL-python==1.2.4b4
itsdangerous==0.24
nltk==3.2
numpy==1.8.2
oauth2==1.9.0.post1
oauthlib==0.6.1
pandas==0.13.1
pyOpenSSL==0.13
pycurl==7.19.3
requests==2.2.1
scikit-learn==0.14.1
scipy==0.13.3
simplejson==3.3.1
psycopg2==2.6.1
SQLAlchemy==1.0.12
Werkzeug==0.11.9
redis==2.10.5

I used the command:

pip install -r requirements.txt

The following is the error encountered:

Collecting Django==1.9.6 (from -r requirements.txt (line 1))
  Using cached Django-1.9.6-py2.py3-none-any.whl
Collecting gunicorn==17.5 (from -r requirements.txt (line 2))
  Using cached gunicorn-17.5.tar.gz
Collecting gevent (from -r requirements.txt (line 3))
  Using cached gevent-1.2.2-cp35-cp35m-win_amd64.whl
Collecting Flask==0.11 (from -r requirements.txt (line 4))
  Using cached Flask-0.11-py2.py3-none-any.whl
Collecting Flask-SQLAlchemy==2.1 (from -r requirements.txt (line 5))
  Using cached Flask-SQLAlchemy-2.1.tar.gz
Requirement already satisfied: Flask-OAuth==0.12 in c:\python35\lib\site-packages (from -r requirements.txt (line 6))
Collecting Jinja2==2.8 (from -r requirements.txt (line 7))
  Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 8))
  Using cached MarkupSafe-0.23.tar.gz
Collecting MySQL-python==1.2.4b4 (from -r requirements.txt (line 9))
  Using cached MySQL-python-1.2.4b4.zip
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
    Extracting in C:\Users\LENOVO~1\AppData\Local\Temp\tmpgw32ylav
    Traceback (most recent call last):
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\setup.py", line 7, in <module>
        use_setuptools()
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 99, in _build_egg
        _extractall(tar)
      File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 486, in _extractall
        self.chown(tarinfo, dirpath)
    TypeError: chown() missing 1 required positional argument: 'numeric_owner'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\

I am using the Windows 10 OS with Python3.5.

Kindly, help me.

2 Answers 2

1

This isn't a direct solution to that problem, but there are other MySQL libraries and one of those may help you skip past this problem, if your solution doesn't have to necessarily use this library. For example, you could try pymysql.

Sign up to request clarification or add additional context in comments.

4 Comments

I am trying to run a repository from Github and it has these requirements. But what I am thinking if that person had worked out with these library requirements then why it is troubling my case?
The most common reason is that the author didn't test with your environment -- didn't test with Windows, or your version of Python. The same install might work on Linux, or another version of Windows.
Thank you for your reply. I will try with the Ubuntu in my virtual box.
No it didn't work by changing the OS. So I guess I need to change the whole code as per the library pymysql
1

MySQL-python is not python3 compatible from what I am seeing on pypi.

4 Comments

Is it? So does the library compatible with other versions f python like 2.7? I am personally not willing to go with Python 2.7 as whole of my project have python3.5 as dependency. But if that is the only solution then I guess I need to code everything as per Python2.7
As stated by Chris. You can give give it a try with pymysql. From looking at the GitHub, it has the goal of being a drop-in replacement. github.com/PyMySQL/PyMySQL
Thank you for your replies I will check it. Also will try to change the environment to Linux Ubuntu if possible.
No worries at all. Best of luck.

Your Answer

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.