Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I want to install modules to Anaconda, I run conda install. However, now I have a .tar.gz file and want to install this. How to do?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
499 views
Welcome To Ask or Share your Answers For Others

1 Answer

There are several way to achieve this, I'm describing one here, which should be relatively straight forward, even if your defualt "python" variable is not anaconda's.

  1. Check what is your desired anaconda environment (if you're not sure what does this mean, it probably means that you are using root, the default environment)
  2. Run: conda info --envs to see the path where your environment is installed
  3. Go to that path, and find the absolute path to python.exe, for example: "C:Program FilesAnaconda3python.exe"
  4. Now, run the following command:

<absolute path to python.exe> -m pip install <path to tar.gz>

for example:

C:Program FilesAnaconda3python.exe -m pip install c:mymodulegreat.tar.gz

Note that <path to tar.gz> can be relative, absolute and even an online link.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...