簡體   English   中英

使用 pip3 安裝 NumPy 失敗,但使用 pip 安裝是可以的

[英]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提前尋求任何幫助。

    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在 3.6 版本中被添加到 Python 中。 看來您的pip3在較早的 Python 下運行,也許是 3.5。

使用pip --versionpip3 --version檢查您的pippip3 (及其解釋器)版本。 如果需要,安裝更新的 Python 版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM