简体   繁体   中英

Installing NumPy with pip3 Fails, but installing with pip is ok

I need to install TensorFlow with pip3, when it gets to the installing NumPy step it stops and gives me the error: (When I tried to install NumPy with pip it was fine, but I need it to work with python 3.) Thanks in advance for any help.

    Traceback (most recent call last):                                                                          
      File "<string>", line 1, in <module>                                                                      
      File "/tmp/pip-build-v32qiaml/numpy/setup.py", line 68                                                    
        f"NumPy {VERSION} may not yet support Python "                                                          
                                                     ^                                                          
    SyntaxError: invalid syntax                                                                                 

    ----------------------------------------                                                                    
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-v32qiaml/numpy/```

F-strings were added to Python at version 3.6. It seems your pip3 runs under earlier Python, perhaps 3.5.

Check your pip and pip3 (and their interpreters) versions with pip --version and pip3 --version . Install more recent Python version if needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM