0
Error:  File "setup.py", line 1849
    exec(f.read(), globals(), fficonfig)
    SyntaxError: unqualified exec is not allowed in function 'configure_ctypes' it contains a nested function with free variables

I had been stupid in not changing the path and now getting aS under Error: could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied

7
  • 1
    The requests package has no such line in the setup.py, nor does it depend on anything that has such a setup.py. Please show us the full log and commands that lead to the above error. Commented Aug 27, 2014 at 11:09
  • 1
    The error indicates you are trying to build Python itself, not requests. The line appears to correlate to Python 3.3.4. Commented Aug 27, 2014 at 11:11
  • Followed steps on this website: docs.python-requests.org/en/latest/user/install/#install Commented Aug 27, 2014 at 11:19
  • At a guess, something is reusing the Python setup.py file (which has a custom distutils built_ext command), and that command is being fed an incompatible fficonfig.py file somewhere. The requests module has no such file. It has no extension build steps at all. Commented Aug 27, 2014 at 11:19
  • 1
    Can you please include the full session. It looks as if something is trying to install python into a virtual env. This is not requests that does this. Commented Aug 27, 2014 at 11:23

2 Answers 2

3

Try folloving:

# tar xzf Python-3.5.0.tgz    
# cd Python-3.5.0
# ./configure --prefix=/usr/local
# make altinstall
Sign up to request clarification or add additional context in comments.

Comments

-2

It seems you are not getting the permission .

Please use "sudo" command for whatever you type

Comments

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.