Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing backports-datetime-fromisoformat on Python 2 doesn't work #14

Closed
EliXie212 opened this issue Nov 14, 2019 · 6 comments
Closed

Comments

@EliXie212
Copy link

When I ran pip install backports-datetime-fromisoformat on ubuntu 18 in the terminal, I ran into the following error: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

And here is a screenshot of the error:
Screenshot from 2019-11-14 12-30-02

Thanks!

@movermeyer
Copy link
Owner

movermeyer commented Nov 24, 2019

Hey @EliXie212,

Thanks for this report.

Judging from the screenshot, you seem to be trying to install backports-datetime-fromisoformat in Python 2.7.

However, backports-datetime-fromisoformat currently only supports Python 3, and is tested against Pyhon 3.4-3.6 (datetime.fromisoformat exists in 3.7+).

Pull Requests are welcome to add Python 2.7 support (related issue), but since Python 2 is deprecated and will be EOL'd in a month, I likely won't be implementing it myself (it's non-trivial to get right).

@naimoon6450
Copy link

My install is using Python3 it seems, but still failing? Unless it's something else that's failing

image

@movermeyer
Copy link
Owner

@naimoon6450 In this case, your C compiler is unable to find the Python.h header file.

This is installed as part of the development package for Python for your platform.

  • For Redhat/CentOS, you can install this by adding the -devel suffix: yum install python-devel.
  • For Ubuntu, from a quick search, it seems to be installed using the -dev suffix: apt-get install python-dev
    For others, you'll have to search the instructions for installing the Python development headers.

Then retry the installation.

@movermeyer movermeyer changed the title Run into error when try to install backports-datetime-fromisoformat Installing backports-datetime-fromisoformat on Python 2 doesn't work Feb 15, 2020
@ShivData
Copy link

ShivData commented Jan 5, 2023

ERROR: Failed building wheel for backports-datetime-fromisoformat (can you share the command for Windows 10 64 bit) to resolve this error.

@movermeyer
Copy link
Owner

ERROR: Failed building wheel for backports-datetime-fromisoformat (can you share the command for Windows 10 64 bit) to resolve this error.

@ShivData Without an actual stack trace or more information, it's impossible to know what is causing the failure.

At minimum, you need to make sure that you have the Python development headers for your version of Python and the MSVC C compiler for it to compile.

Doing a quick search, it seems that installing Visual Studio is the easiest way to get setup.

All supported versions of Python can be built using Microsoft Visual Studio 2017 or later. You can download and use any of the free or paid versions of Visual Studio.

When installing it, select the Python development workload and the optional Python native development tools component to obtain all of the necessary build tools.

Good luck.

@YingjieL
Copy link

YingjieL commented Aug 4, 2023

ERROR: Failed building wheel for backports-datetime-fromisoformat (can you share the command for Windows 10 64 bit) to resolve this error.

@ShivData Without an actual stack trace or more information, it's impossible to know what is causing the failure.

At minimum, you need to make sure that you have the Python development headers for your version of Python and the MSVC C compiler for it to compile.

Doing a quick search, it seems that installing Visual Studio is the easiest way to get setup.

All supported versions of Python can be built using Microsoft Visual Studio 2017 or later. You can download and use any of the free or paid versions of Visual Studio.
When installing it, select the Python development workload and the optional Python native development tools component to obtain all of the necessary build tools.

Good luck.

image
image
I had a similar problem when I was pip install trafilatura, python3.6. What should I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants