アプリ版:「スタンプのみでお礼する」機能のリリースについて

anacondaをインストールしました.
https://weblabo.oscasierra.net/python-anaconda-i …

手順は以上の通り案内通りに行いました.
anaconda prompt上で,import numpyは問題なくできますが,コマンドプロンプト上で行うと以下のエラーがでます.

C:\Users\kaito>python
Python 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
C:\Users\kaito\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Traceback (most recent call last):
File "C:\Users\kaito\anaconda3\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
from . import multiarray
File "C:\Users\kaito\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
from . import overrides
File "C:\Users\kaito\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: 指定されたモジュールが見つかりません。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\kaito\anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\kaito\anaconda3\lib\site-packages\numpy\core\__init__.py", line 50, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-i …

Please note and check the following:

* The Python version is: Python3.8 from "C:\Users\kaito\anaconda3\python.exe"
* The NumPy version is: "1.18.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: 指定されたモジュールが見つかりません。


どのようにすれば,コマンドプロンプト上でnumpyを使えるようになるのでしょうか.



C:\Users\kaito>python -m pip install --upgrade pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
割愛
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=Non
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Requirement already up-to-date: pip in c:\users\kaito\anaconda3\lib\site-packages (20.1.1)

C:\Users\kaito>pip install numpy --upgrade
'pip' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。



アップグレードしたらいいとネットにかいてあったので,pipをアップグレードした後,numpyもしたところ,pipも認識しなくなりました...

昔,tensorflowも失敗しています(笑)
環境構築下手すぎるので,どなたかご教示していただけないでしょうか.
よろしくお願いいたします.

質問者からの補足コメント

  • うれしい

    いつもお世話になっております.
    回答ありがとうございます.
    無事にimportすることができました.ありがとうございます.
    エラーは,最後しかみていませんでした.最初にも内容かいてあるのですね..


    一つ質問なのですが,conda install と pip installの使い分けはどのようにすればいいのでしょうか.混ぜるな,危険とネットに書いてありますがどうなんでしょうか.
    今の認識は,conda は,環境を破壊せずにinstallしてくれる.pip installは,破壊してまでも,installするということです.あってますかね?


    ならば,基本は,conda installを使っていけばいいのでしょうか?

    関係ない質問で申し訳ありませんが,ご回答よろしくお願いいたします.

    No.1の回答に寄せられた補足コメントです。 補足日時:2020/10/25 11:39

A 回答 (2件)

正直、Anacondaは重すぎて使ってないんですが。



> ならば,基本は,conda installを使っていけばいいのでしょうか?

Anacondaを使っている以上、そうでしょうね。
    • good
    • 0
この回答へのお礼

やはりそうなりますよね.
ありがとうございます.

いつもお答いただき誠にありがとうございます.

お礼日時:2020/10/25 12:04

エラー読む限り、mkl-service packageってのをインストールすれば良いみたいですが。



Githubの

IntelPython /mkl-service:
https://github.com/IntelPython/mkl-service

に依ると、

conda install -c intel mkl-service

か、

conda install -c conda-forge mkl-service

を打てば、解決するんじゃないんですか?
この回答への補足あり
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!