我是Mac,載完numpy後執行跑出個個 Traceback (most recent call last): File "/Users/johnathan/Desktop/學科/機器學習/3:1/test.py", line 1, in import numpy as np ModuleNotFoundError: No module named 'numpy'
老師您好,我用的是windows,寫程式是用Visual Studio Code。我有在終端機打pip install numpy,但是要執行程式時卻跑出這些訊息,想請問老師哪裡有錯誤? 以下是跑出來的訊息。謝謝老師 File "C:\Users\ewje3\OneDrive\桌面\Python umpy.py", line 1, in import numpy as np File "C:\Users\ewje3\OneDrive\桌面\Python umpy.py", line 2, in data1 = np.array([3,4,5]) AttributeError: partially initialized module 'numpy' has no attribute 'array' (most likely due to a circular import)
ERROR: Command errored out with exit status 1: command: 'C:\Users\jason\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\jason\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\jason\AppData\Local\Temp\tmp986xph51' cwd: C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e Complete output (208 lines): setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e\tools\cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import LooseVersion Processing numpy/random\_bounded_integers.pxd.in Processing numpy/random\bit_generator.pyx Processing numpy/random\mtrand.pyx Processing numpy/random\_bounded_integers.pyx.in Processing numpy/random\_common.pyx Processing numpy/random\_generator.pyx Processing numpy/random\_mt19937.pyx Processing numpy/random\_pcg64.pyx Processing numpy/random\_philox.pyx Processing numpy/random\_sfc64.pyx Cythonizing sources blas_opt_info: blas_mkl_info: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils customize MSVCCompiler libraries mkl_rt not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE blis_info: libraries blis not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE openblas_info: libraries openblas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']' customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize IntelVisualFCompiler Could not locate executable ifort Could not locate executable ifl customize AbsoftFCompiler Could not locate executable f90 customize CompaqVisualFCompiler Could not locate executable DF customize IntelItaniumVisualFCompiler Could not locate executable efl customize Gnu95FCompiler Could not locate executable gfortran Could not locate executable f95 customize G95FCompiler Could not locate executable g95 customize IntelEM64VisualFCompiler customize IntelEM64TFCompiler Could not locate executable efort Could not locate executable efc customize PGroupFlangCompiler Could not locate executable flang don't know how to compile Fortran code on platform 'nt' NOT AVAILABLE
accelerate_info: NOT AVAILABLE atlas_3_10_blas_threads_info: Setting PTATLAS=ATLAS libraries tatlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE atlas_3_10_blas_info: libraries satlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE atlas_blas_info: libraries f77blas,cblas,atlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e umpy\distutils\system_info.py:2026: UserWarning: Optimized (vendor) Blas libraries are not found. Falls back to netlib Blas library which has worse performance. A better performance should be easily gained by switching Blas library. if self._calc_info(blas): blas_info: libraries blas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e umpy\distutils\system_info.py:2026: UserWarning: Blas (www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. if self._calc_info(blas): blas_src_info: NOT AVAILABLE C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e umpy\distutils\system_info.py:2026: UserWarning: Blas (www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. if self._calc_info(blas): NOT AVAILABLE non-existing path in 'numpy\\distutils': 'site.cfg' lapack_opt_info: lapack_mkl_info: libraries mkl_rt not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE openblas_lapack_info: libraries openblas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE openblas_clapack_info: libraries openblas,lapack not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE flame_info: libraries flame not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE atlas_3_10_threads_info: Setting PTATLAS=ATLAS libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries tatlas,tatlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries lapack_atlas not found in C:\ libraries tatlas,tatlas not found in C:\ libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs libraries tatlas,tatlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE atlas_3_10_info: libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries satlas,satlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries lapack_atlas not found in C:\ libraries satlas,satlas not found in C:\ libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs libraries satlas,satlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries ptf77blas,ptcblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries lapack_atlas not found in C:\ libraries ptf77blas,ptcblas,atlas not found in C:\ libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs libraries ptf77blas,ptcblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE atlas_info: libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries f77blas,cblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib libraries lapack_atlas not found in C:\ libraries f77blas,cblas,atlas not found in C:\ libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs libraries f77blas,cblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE lapack_info: libraries lapack not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs'] NOT AVAILABLE C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e umpy\distutils\system_info.py:1858: UserWarning: Lapack (www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. return getattr(self, '_calc_info_{}'.format(name))() lapack_src_info: NOT AVAILABLE C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p umpy_d50ea732bf67475b8e4420b92eb2642e umpy\distutils\system_info.py:1858: UserWarning: Lapack (www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. return getattr(self, '_calc_info_{}'.format(name))() NOT AVAILABLE numpy_linalg_lapack_lite: FOUND: language = c define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')] Warning: attempted relative import with no known parent package C:\Users\jason\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) running bdist_wheel running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building py_modules sources creating build creating build\src.win-amd64-3.10 creating build\src.win-amd64-3.10 umpy creating build\src.win-amd64-3.10 umpy\distutils building library "npymath" sources error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": visualstudio.microsoft.com/downloads/ ---------------------------------------- ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available. You should consider upgrading via the 'C:\Users\jason\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
彭彭老師你好,我是windows系統的,pip install numpy成功後 import numpy as np 執行相關程式,例如ndarr=np.array([3,4,5]) 會出現ModuleNotFoundError: No module named 'numpy'錯誤訊息,請問彭彭有遇過相同的問題嗎??想尋求解決方法
希望老師可以教教一些機器學習的影片或是入門教學,本人對機器滿有興趣的,但是不知道怎麼開始,這麼多的老師裡面,唯一教的最清楚就是彭彭老師了。
謝謝你的建議和回饋,我會考慮教上一些機器學習的,在這個 NumPy 之後 ~
你讲的真是太好了,我是大陆特意翻墙出来听你讲课的,就是内容更新有点慢~支持你!
谢谢哪,感谢你愿意特别来给支持 :) 更新速度我会再努力一下的 ~
感謝彭彭老師無私分享 老師真香
我有每天洗澡 XDDDD
感謝彭彭老師無私教學😄
😄😄
謝謝你~!!!最近剛好需要學習這個東西 一看到影片就馬上點進來了
哈哈哈,太好了,希望會對你有幫助 :)
最近剛好要學,期待繼續出新片,教的超讚的
謝謝哪,加油加油,希望對你有幫助 ~~~
感謝老師!又有神課程可以追了
謝謝哪,加油 ~~~
我今年讀研所就是要學這個 感謝老師
哈哈哈,這麼剛好,感覺很棒 :)
看完彭彭老師的課程,簡單易懂,對初學者很有幫助,另外請教MAC如何安裝Submile的步驟呢?要試寫Code無法出現選項列
很高興對你有幫助,不過我沒辦法和你說怎麼安裝 Sublime,我自己沒安裝過 ~
有可能出tensorflow 或pytorch 教學嗎
感謝你的建議,雖然時間有限,但我會盡量安排看看 :)
老師希望能多教一些與真實資料的使用!
好哦,謝謝你的建議,我會考慮進去的 ~~~~
!!!這學期的課剛好要用到
哦哦哦,剛剛好!!!
老师讲的太棒了
:))))
太愛了
:)))
謝謝老師
不會 :)
請問彭彭老師能教opencv嗎?
謝謝你的回饋哪,近期雖然還沒有打算,但我會規畫看看 :)
我是Mac,載完numpy後執行跑出個個
Traceback (most recent call last):
File "/Users/johnathan/Desktop/學科/機器學習/3:1/test.py", line 1, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
可能沒有順利安裝,也可能是電腦中有其他的虛擬環境在運作,例如 Anaconda,如果對虛擬環境的管理不熟悉,會建議先移除這類的程式再試試看 ~
@@cwpeng-course 已發現原因,因為vscode 選到Mac os 內建的python2.7版本 哈哈
老師您好,有問題想請教,輸入python start.py 沒辦法在powershell下執行,請問我是否哪裡操作錯誤
要看看是否有錯誤訊息,如果沒有的話,確認是否有先儲存檔案,或者就重新啟動電腦再試是看 ~
彭彭老師 好 我是第一次 coding 看完你的影片 我想學習 python,但我下載完 python and VSC, 根據你 2 年前的第一堂課 ("Hello Python"), 我在 terminal 打 python start.py, 後按 enter 他們沒有反應。也不適 coding 錯誤。enter 後 直接就下一行了,並沒有執行代碼。請問是甚麼問題?
如下
PS D:\python-training> python start.py
PS D:\python-training>
環境設定的問題,細節要再確認。但很可能是 VS Code 的擴充套件帶來的影響,你可以試著到左邊擴充套件管理的選單裡,把擴充套件都先停用或移除,重新啟動 VS Code 再試試看 ~
print一個物件本身是不是怪怪的
老師說不要糾結的問題是這個嗎?
使用 print() 來印出某個資料,最終會怎麼樣顯示在終端機中,會因為系統和環境有點細節差異,不代表他是不一樣的東西。例如我們寫的是 {"x":3} 印出來可能是 {'x':3} 但其實是講同樣的東西,前面的 x 都是字串的概念。
老師您好,我用的是windows,寫程式是用Visual Studio Code。我有在終端機打pip install numpy,但是要執行程式時卻跑出這些訊息,想請問老師哪裡有錯誤? 以下是跑出來的訊息。謝謝老師
File "C:\Users\ewje3\OneDrive\桌面\Python
umpy.py", line 1, in
import numpy as np
File "C:\Users\ewje3\OneDrive\桌面\Python
umpy.py", line 2, in
data1 = np.array([3,4,5])
AttributeError: partially initialized module 'numpy' has no attribute 'array' (most likely due to a circular import)
本身的程式名稱不要使用和套件一樣的 numpy.py,換個名字 ~
彭彭老師, 不好意思, 請問哪一個教學有Visual Sudio Code? 在你的影片清單找不到, 謝謝.
清單中的第一部就有嘍 ~
那這個可以用在opencv嗎?
OpenCV 經常會使用到 NumPy 相關的工具沒錯 ~
彭彭老師好,我在終端機輸入pip install numpy後,出現以下錯誤訊息(抱歉有點長,分成三份),請問排除呢?
PS C:\Python-training> pip install numpy
Collecting numpy
Using cached numpy-1.21.2.zip (10.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: numpy
Building wheel for numpy (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\jason\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\jason\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\jason\AppData\Local\Temp\tmp986xph51'
cwd: C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
Complete output (208 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e\tools\cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
blis_info:
libraries blis not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
umpy\distutils\system_info.py:2026:
UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
blas_info:
libraries blas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
umpy\distutils\system_info.py:2026:
UserWarning:
Blas (www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
blas_src_info:
NOT AVAILABLE
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
umpy\distutils\system_info.py:2026:
UserWarning:
Blas (www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
NOT AVAILABLE
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
flame_info:
libraries flame not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries tatlas,tatlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
libraries tatlas,tatlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries satlas,satlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
libraries satlas,satlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries ptf77blas,ptcblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
libraries ptf77blas,ptcblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries f77blas,cblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\lib
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
libraries f77blas,cblas,atlas not found in C:\Users\jason\AppData\Local\Programs\Python\Python310\libs
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\', 'C:\\Users\\jason\\AppData\\Local\\Programs\\Python\\Python310\\libs']
NOT AVAILABLE
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
umpy\distutils\system_info.py:1858:
UserWarning:
Lapack (www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
NOT AVAILABLE
C:\Users\jason\AppData\Local\Temp\pip-install-li_nbr_p
umpy_d50ea732bf67475b8e4420b92eb2642e
umpy\distutils\system_info.py:1858:
UserWarning:
Lapack (www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
NOT AVAILABLE
numpy_linalg_lapack_lite:
FOUND:
language = c
define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
Warning: attempted relative import with no known parent package
C:\Users\jason\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.10
creating build\src.win-amd64-3.10
umpy
creating build\src.win-amd64-3.10
umpy\distutils
building library "npymath" sources
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Users\jason\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
可能是版本的問題,3.10 不支援 Windows 7 以前的作業系統,你可以試著移除 Python,重新安裝 3.9 以下的版本再試試看。
@@cwpeng-course 解決了!謝謝老師
彭彭老師你好,我是windows系統的,pip install numpy成功後 import numpy as np 執行相關程式,例如ndarr=np.array([3,4,5]) 會出現ModuleNotFoundError: No module named 'numpy'錯誤訊息,請問彭彭有遇過相同的問題嗎??想尋求解決方法
通常是因為你曾經安裝過 Python 的虛擬環境,例如安裝 Anaconda 這樣的東西,如果不知道如何管理虛擬環境,可以先把過去所有曾經安裝過 Python 相關的工具都先移除再試試看。
彭彭老師你好,我要在終端機輸入pip install numpy,其顯示
pip : 無法辨識 'pip' 詞彙是否為 Cmdlet、函數、指令檔或可執行程式的名稱。請檢查名稱拼字是否正
確,如果包含路徑的話,請確認路徑是否正確,然後再試一次。
位於 線路:1 字元:1
+ pip install numpy
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
但我在網路上查了如何修改路徑,卻一直無法使用,請問如何解決問題
同問+1
先確定有安裝 Python,如果有的話可以關閉電腦重開再一次。如果是 Mac 可以改打 pip3 install numpy
@@cwpeng-course 謝謝老師~
我有遇到一樣的問題一直解決不了,我上網查了很久網路上都說跟環境變數設定有關,環境變數裡面有一個變數名稱叫Path,我用的是windows 7不知道為什麼我的Path變數裡面只能存放一個資料夾路徑(網路上的截圖都是可以一個變數裡面放很多路徑),而python主程式放在python38資料夾底下,pip放在python38/Scripts底下,這導致我的Path變數設定在python主程式的路徑就不能執行pip,反之則不能執行python。
同樣遇到此問題QQ
看來下次還會有pandas
目前的計畫會把 NumPy 先仔細介紹完,然後往 Pandas 和 TensorFlow 這兩邊去走 ~
已經用pip install numpy下載好了,但用import numpy的時候numpy一直表示reportMissingImports,是我要把python所有檔案都丟在同一個文件夾還是什麼問題? 本人是windows 用Visual Studio Code寫
可能你的電腦裡還有安裝其他的環境,例如 Anaconda,會影響到你的程式運作,如果不知道如何管理虛擬環境,可以把其他 Python 環境移除後再試試看。
老師好,我是用mac,我輸入python查一下版本,是python2,請問要如何設定成python3?
並且我的import numpy出現以下錯誤,無法編譯
Import "numpy" could not be resolved
確定有安裝第三版的 Python,直接使用命令 python3 就可以了
想請問老師為什麼教課書最後一行都會出現print(),刪掉也不會影響程式為什麼要多打這行?
它可能只是要表達多印出一行空白,但書不是我寫的我沒辦法確定 XDDD
老師您好,我試了好多次,終端機依然還是找不到路徑,請問怎麼解決?
需要先把錯誤訊息或者是程式碼貼出來,才有辦法進一步去找尋可能的問題 ~
要安裝numpy 發現此問題
PS C:\python-training> pip install numpy
Requirement already satisfied: numpy in c:\programdata\anaconda3\lib\site-packages (1.18.5)
我有安裝spyder 該怎解決
表示已經安裝過了,如果還是不能用,就得仔細的去管理電腦中的虛擬環境,不然就得把 spyder 先移除。
老师,我安装完是 vs code 后 运行pyhton文件,总是提示找不到该文件或者路径,
确认有先在 VS Code 中做打开资料夹的动作哦
電腦右下角是9/27 影片上傳是9/26 這是Python的鉗形攻勢嗎
有這等事 XDDD 我還沒注意,大概是 TH-cam 時間沒有把時區根據上傳者的時區紀錄吧,我猜 XDDD
無法安裝怎麼辦
可能要看看有什麼錯誤訊息或狀況嘍 ~
我跳出好多錯誤訊息喔 該怎麼解決
可能至少要把錯誤訊息貼出來呦 ~