Reputation: 327
I am using Anaconda with 64 bit Python 2.7 on a Windows 7 machine that is necessarily isolated from the internet. I am having difficulty installing local packages. Right now I am stuck on PyMySQL, but I imagine I would also have the same problem with other packages. My system PATH variable has Anaconda at the beginning.
Trying a path to the unpacked folder:
conda install –-offline c:\temp\PyMySQL-master\pymysql
PackageNotFoundError: Package missing in current win-64 channels:
- c:\temp\pymysql-master\pymysql
What does this error mean? I have tried using a tar file and I get the same error message. This is the same message I get if I spell the filename wrong, so there is something I am missing to get it to recognize the file. Do I need to create a channel for a local package? How would I do that? Is there anything else I should try?
Here is the response in verbose mode:
conda install --offline --verbose c:\temp\pymysql.tar
Fetching package metadata ...........
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.3.21
conda is private : False
conda-env version : 4.3.21
conda-build version : not installed
python version : 2.7.13.final.0
requests version : 2.14.2
root environment : C:\ProgramData\Anaconda2 (writable)
default environment : C:\ProgramData\Anaconda2
envs directories : C:\ProgramData\Anaconda2\envs
C:\Users\lab1\AppData\Local\conda\conda\envs
C:\cygwin\home\lab1\.conda\envs
package cache : C:\ProgramData\Anaconda2\pkgs
C:\Users\lab1\AppData\Local\conda\conda\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64 (offline)
https://repo.continuum.io/pkgs/free/noarch (offline)
https://repo.continuum.io/pkgs/r/win-64 (offline)
https://repo.continuum.io/pkgs/r/noarch (offline)
https://repo.continuum.io/pkgs/pro/win-64 (offline)
https://repo.continuum.io/pkgs/pro/noarch (offline)
https://repo.continuum.io/pkgs/msys2/win-64 (offline)
https://repo.continuum.io/pkgs/msys2/noarch (offline)
config file : C:\cygwin\home\lab1\.condarc
netrc file : None
offline mode : True
user-agent : conda/4.3.21 requests/2.14.2 CPython/2.7.13 Windows/7 Windows/6.1.7601
administrator : True
`$ C:\ProgramData\Anaconda2\Scripts\conda-script.py install --offline --verbose c:\temp\pymysql.tar`
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\conda\exceptions.py", line 632, in conda_exception_handler
return_value = func(*args, **kwargs)
File "C:\ProgramData\Anaconda2\lib\site-packages\conda\cli\main.py", line 137, in _main
exit_code = args.func(args, p)
File "C:\ProgramData\Anaconda2\lib\site-packages\conda\cli\main_install.py", line 80, in execute
install(args, parser, 'install')
File "C:\ProgramData\Anaconda2\lib\site-packages\conda\cli\install.py", line 306, in install
raise PackageNotFoundError(error_message)
PackageNotFoundError: Package missing in current win-64 channels:
- c:\temp\pymysql.tar
Upvotes: 3
Views: 16980
Reputation: 4752
Every conda package ever built to date has a .tar.bz2 extension, and this assumption is baked in deeply. Someday we'll probably add different package types, compression algorithms, and extensions, but that's a ways off. So to work, your command needs to be
conda install --offline --verbose c:\temp\pymysql.tar.bz2
and pymysql.tar.bz2
needs to be a real conda package. (i.e. if you unpack that tarball and there's no info/files
file in it, then it's not a conda package)
Upvotes: 3