পিপ ব্যবহার করে পাইআস্ট্রোনমিটির জন্য একটি বাহ্যিক লাইব্রেরি ইনস্টল করার চেষ্টা করছি:
pip install PyAstronomy_ext
আমি Anaconda কমান্ড প্রম্পট এর মাধ্যমে এটি করি। প্রথমবারের মত আমি নিম্নোক্ত ত্রুটিগুলি দেখালাম:
building 'PyAstronomy_ext.forTrans.occultnl' extension
error: extension 'PyAstronomy_ext.forTrans.occultnl' has Fortran sources but no Fortran compiler found
----------------------------------------
Failed building wheel for PyAstronomy-ext
এবং
Command "c:\users\matte\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\matte\\AppData\\Local\\Temp\\pip-install-5pkiwi34\\PyAstronomy-ext\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\matte\AppData\Local\Temp\pip-record-bok3jklv\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\matte\AppData\Local\Temp\pip-install-5pkiwi34\PyAstronomy-ext\
তাই আমি ইন্টারনেট চেক এবং এই পাওয়া যায় বিষয় । আমি MinGW ইনস্টল করেছি এবং সমস্ত ফোর্টার সম্পর্কিত প্যাকেজ ডাউনলোড করেছি, এবং নিশ্চিত যে আমি একটি পরীক্ষা স্ক্রিপ্টও লিখেছি এবং gFortran ব্যবহার করে এটি সংকলন করেছি, এবং এটি জরিমানা করেছে।
আমি আবার ইনস্টলেশন চালানোর চেষ্টা যখন একই ত্রুটি পপ আপ।
দ্য উত্তর এছাড়াও এই উল্লেখ:
ইনস্টলেশনের পরে, সিস্টেমে PATH এর বাইনারিটির পথ যুক্ত করুন।
কিন্তু আমি বুঝতে পারছি না এর মানে কি, আমি ইনস্টলেশন কমান্ড চালানোর চেষ্টা করেছি C:\MinGW\bin
কিন্তু একই ত্রুটি ঘটে।
যদি আপনার সমস্ত কনসোল কথোপকথনটি ত্রুটিযুক্ত থাকে তবে এতে ত্রুটি রয়েছে:
Collecting PyAstronomy_ext
Using cached https://files.pythonhosted.org/packages/32/11/27b1fee690d7d5801580da2c25145a6fcce3ad3d0a1b8c41de09d5615825/PyAstronomy_ext-1.tar.gz
Requirement already satisfied: numpy in c:\users\matte\anaconda3\lib\site-packages (from PyAstronomy_ext) (1.16.0)
Requirement already satisfied: six in c:\users\matte\anaconda3\lib\site-packages (from PyAstronomy_ext) (1.11.0)
Building wheels for collected packages: PyAstronomy-ext
Building wheel for PyAstronomy-ext (setup.py) ... error
Complete output from command c:\users\matte\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\matte\\AppData\\Local\\Temp\\pip-install-cg99ug7_\\PyAstronomy-ext\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\matte\AppData\Local\Temp\pip-wheel-0gj25_97 --python-tag cp36:
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 extension "PyAstronomy_ext.forTrans.occultnl" sources
f2py options: []
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans' to include_dirs.
building extension "PyAstronomy_ext.forTrans.occultquad" sources
f2py options: []
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans' to include_dirs.
adding 'build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\occultquad-f2pywrappers.f' to sources.
build_src: building npy-pkg config files
running build_py
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\PyAstronomy_ext
copying PyAstronomy_ext\__init__.py -> build\lib.win-amd64-3.6\PyAstronomy_ext
creating build\lib.win-amd64-3.6\PyAstronomy_ext\forTrans
copying PyAstronomy_ext\forTrans\__init__.py -> build\lib.win-amd64-3.6\PyAstronomy_ext\forTrans
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
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'
warning: build_ext: f77_compiler=None is not available.
building 'PyAstronomy_ext.forTrans.occultnl' extension
error: extension 'PyAstronomy_ext.forTrans.occultnl' has Fortran sources but no Fortran compiler found
----------------------------------------
Failed building wheel for PyAstronomy-ext
Running setup.py clean for PyAstronomy-ext
Failed to build PyAstronomy-ext
Installing collected packages: PyAstronomy-ext
Running setup.py install for PyAstronomy-ext ... error
Complete output from command c:\users\matte\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\matte\\AppData\\Local\\Temp\\pip-install-cg99ug7_\\PyAstronomy-ext\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\matte\AppData\Local\Temp\pip-record-5q39xvki\install-record.txt --single-version-externally-managed --compile:
running install
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 extension "PyAstronomy_ext.forTrans.occultnl" sources
f2py options: []
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans' to include_dirs.
building extension "PyAstronomy_ext.forTrans.occultquad" sources
f2py options: []
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\PyAstronomy_ext\forTrans' to include_dirs.
adding 'build\src.win-amd64-3.6\PyAstronomy_ext\forTrans\occultquad-f2pywrappers.f' to sources.
build_src: building npy-pkg config files
running build_py
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\PyAstronomy_ext
copying PyAstronomy_ext\__init__.py -> build\lib.win-amd64-3.6\PyAstronomy_ext
creating build\lib.win-amd64-3.6\PyAstronomy_ext\forTrans
copying PyAstronomy_ext\forTrans\__init__.py -> build\lib.win-amd64-3.6\PyAstronomy_ext\forTrans
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
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'
warning: build_ext: f77_compiler=None is not available.
building 'PyAstronomy_ext.forTrans.occultnl' extension
error: extension 'PyAstronomy_ext.forTrans.occultnl' has Fortran sources but no Fortran compiler found
----------------------------------------
Command "c:\users\matte\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\matte\\AppData\\Local\\Temp\\pip-install-cg99ug7_\\PyAstronomy-ext\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\matte\AppData\Local\Temp\pip-record-5q39xvki\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\matte\AppData\Local\Temp\pip-install-cg99ug7_\PyAstronomy-ext\
সম্পাদনা করুন: আমি কিছু খনন করে সমস্যার সমাধান করতে সক্ষম ছিলাম, আমাকে একটি লিখতে হয়েছিল distutils.cfg
ফাইল C:\...\Anaconda3\Lib\distutils
নিম্নলিখিত সঙ্গে:
[build]
compiler=mingw32
এবং তারপর নিম্নলিখিত কমান্ড Anaconda প্রম্পট থেকে চালান:
conda install libpython
conda install -c msys2 m2w64-toolchain
তারপর pip install PyAstronomy_ext
পুরোপুরি কাজ।
যে কেউ এই সমস্যা সম্মুখীন হলে আমি এই এখানে চলে যাচ্ছি।