Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
485 views
in Technique[技术] by (71.8m points)

python 3.x - Installing modules to Anaconda from .tar.gz

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

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

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...