I want to create a new conda environment.
However, I get the following error message:
(base) ➜ ~ conda env create -n ml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
- libspatialindex==1.9.0=h6de7cb9_1
- libgdal==2.4.0=h89caebc_1002
- gdal==2.4.0=py37h0e3174d_1002
- openblas==0.3.5=h436c29b_1001
- libcxxabi==8.0.0=2
I removed all of my old environments (they had become bloated) and uninstalled and reinstalled a new miniconda3 installation.
(base) ➜ ~ conda env list
# conda environments:
#
base * /Users/tommylees/miniconda3
Here is some other information:
(base) ➜ ~ conda info
active environment : base
active env location : /Users/tommylees/miniconda3
shell level : 1
user config file : /Users/tommylees/.condarc
populated config files :
conda version : 4.9.2
conda-build version : not installed
python version : 3.8.6.final.0
virtual packages : __osx=10.15.7=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/tommylees/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/tommylees/miniconda3/pkgs
/Users/tommylees/.conda/pkgs
envs directories : /Users/tommylees/miniconda3/envs
/Users/tommylees/.conda/envs
platform : osx-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.8.6 Darwin/19.6.0 OSX/10.15.7
UID:GID : 501:20
netrc file : None
offline mode : False
(base) ➜ ~ cat /Users/tommylees/.condarc
cat: /Users/tommylees/.condarc: No such file or directory
(base) ➜ ~ ls /Users/tommylees/.conda/envs
ls: /Users/tommylees/.conda/envs: No such file or directory
I do not understand why the conda installer is still looking for gdal or other packages which were previously installed but I thought I had removed.
Related
Just tried to update conda via Anaconda Prompt but it is not working.
After I managed to open Anaconda Prompt as administrator to mitigate:The current user does not have write permissions to a required path. problem even if I open promt from navigator-Enviroments-base root - open terminal
after command conda update conda.
So After opening Prompt as Administrator I used commands from conda cheatlist from here:https://conda.io/projects/conda/en/latest/user-guide/cheatsheet.html
I have updated Anaconda but when I ask version number it the same before updating.
I typed: conda update conda
I got:
Solving environment: \
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
(Many packages here)
done
## Package Plan ##
environment location: D:\Program Files\Anaconda
added / updated specs:
- conda
The following NEW packages will be INSTALLED:
(packages)
The following packages will be UPDATED:
(packages)
The following packages will be DOWNGRADED:
(packages)
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ DEBUG menuinst_win32:__init__(199): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'D:\Program Files\Anaconda', env_name: 'None', mode: 'system', used_mode: 'system'
DEBUG menuinst_win32:create(323): Shortcut cmd is "D:\Program Files\Anaconda\python.exe", args are ['"D:\\Program Files\\Anaconda\\cwp.py"', '"D:\\Program Files\\Anaconda"', '"D:\\Program Files\\Anaconda\\python.exe"', '"D:\\Program Files\\Anaconda\\Scripts\\jupyter-notebook-script.py"', '"%USERPROFILE%/"']
DEBUG menuinst_win32:__init__(199): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'D:\Program Files\Anaconda', env_name: 'None', mode: 'system', used_mode: 'system'
DEBUG menuinst_win32:create(323): Shortcut cmd is "D:\Program Files\Anaconda\python.exe", args are ['"D:\\Program Files\\Anaconda\\cwp.py"', '"D:\\Program Files\\Anaconda"', '"D:\\Program Files\\Anaconda\\python.exe"', '"D:\\Program Files\\Anaconda\\Scripts\\jupyter-notebook-script.py"', '"%USERPROFILE%/"']
- DEBUG menuinst_win32:__init__(199): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'D:\Program Files\Anaconda', env_name: 'None', mode: 'system', used_mode: 'system'
DEBUG menuinst_win32:create(323): Shortcut cmd is "D:\Program Files\Anaconda\python.exe", args are ['"D:\\Program Files\\Anaconda\\cwp.py"', '"D:\\Program Files\\Anaconda"', '"D:\\Program Files\\Anaconda\\python.exe"', '"D:\\Program Files\\Anaconda\\Scripts\\jupyter-notebook-script.py"', '"%USERPROFILE%/"']
done
And than I check version again ... and nothing!
(base) C:\WINDOWS\system32>conda --version
conda 4.9.2
I used command in cheatlist:
(base) C:\WINDOWS\system32>conda update -n base conda
Collecting package metadata (current_repodata.json): done
Solving environment: done
Package Plan
environment location: D:\Program Files\Anaconda
added / updated specs:
- conda
The following packages will be downloaded:
(packages)
Proceed ([y]/n)?
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
I tied to check conda version again - and got the same old version I have before update
(base) C:\WINDOWS\system32>conda -V
conda 4.9.2
(base) C:\WINDOWS\system32>python -V
Python 3.7.7
(base) C:\WINDOWS\system32>conda list anaconda$
packages in environment at D:\Program Files\Anaconda:
Name Version Build Channel
anaconda custom py37_1
(base) C:\WINDOWS\system32>conda info
active environment : base
active env location : D:\Program Files\Anaconda
shell level : 1
user config file : C:\Users\G703\.condarc
populated config files : C:\Users\G703\.condarc
conda version : 4.9.2
conda-build version : 3.18.11
python version : 3.7.7.final.0
virtual packages : __cuda=11.2=0
__win=0=0
__archspec=1=x86_64
base environment : D:\Program Files\Anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\Program Files\Anaconda\pkgs
C:\Users\G703\.conda\pkgs
C:\Users\G703\AppData\Local\conda\conda\pkgs
envs directories : D:\Program Files\Anaconda\envs
C:\Users\G703\.conda\envs
C:\Users\G703\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.7.7 Windows/10 Windows/10.0.19041
administrator : True
netrc file : None
offline mode : False
The same in Anaconda Power Shell:
(base) PS C:\WINDOWS\system32> conda update -n base conda
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(base) PS C:\WINDOWS\system32> conda update anaconda
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(base) PS C:\WINDOWS\system32> conda info
active environment : base
active env location : D:\Program Files\Anaconda
shell level : 1
user config file : C:\Users\G703\.condarc
populated config files : C:\Users\G703\.condarc
conda version : 4.9.2
conda-build version : 3.18.11
python version : 3.7.7.final.0
virtual packages : __cuda=11.2=0
__win=0=0
__archspec=1=x86_64
base environment : D:\Program Files\Anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\Program Files\Anaconda\pkgs
C:\Users\G703\.conda\pkgs
C:\Users\G703\AppData\Local\conda\conda\pkgs
envs directories : D:\Program Files\Anaconda\envs
C:\Users\G703\.conda\envs
C:\Users\G703\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.7.7 Windows/10 Windows/10.0.19041
administrator : True
netrc file : None
offline mode : False
Any ideas what I should try to properly update Anaconda and Navigator from the prompt?
Or I have to download New Version from the website and Uninstall old one?
Many Thanks!
You may want to run:
conda update conda
conda install anaconda=<version>
Check out this question.
This is kinda weird--I installed the latest version 3.19.2 of conda-build in an environment, but I cannot seem to access that latest version. The environment keeps referencing version 3.18.11.
I want to use conda-build version 3.19.2 and I installed it in my environment. But for some reason I cannot seem to access it.
Here is a way to recreate the issue. Note that I am using conda-forge so that is setup in my .condarc.
create a new anaconda environment using conda version 4.8.3.
conda create -c conda-forge -n pkg-builder conda-build
When I check the conda-build version it indicates 3.19.2
conda list conda-build
Name Version Build Channel \
conda-build 3.19.2 py38h32f6830_2 conda-forge
When I try and use conda-build it reads an older version
conda build --version
>>> 3.18.11
Conda info reads shows the wrong version too--even though the higher level is installed.
conda info
active environment : pkg-builder
active env location : /../anaconda3/envs/pkg-builder
shell level : 3
user config file : /../.condarc
populated config files : /../.condarc
conda version : 4.8.3
conda-build version : 3.18.11 <--------THIS IS THE WRONG VERSION - SHOULD BE 3.19.2
python version : 3.8.3.final.0
virtual packages : __cuda=10.0
__glibc=2.27
base environment : /../anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /../anaconda3/pkgs
/../.conda/pkgs
envs directories : /../anaconda3/envs
/../.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/4.15.0-112-generic
ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : /../.netrc
offline mode : False
How can I access the correct version of conda-build?
[Edit] Added conda info to question.
Something wrong is happening with my conda setup.
From what I remember, I needed the AI gym library for a lab at my university.
I tried to install it using conda install -c akode gym and I was unable to do so. I used a pip install instead.
Since then, I am having the following error whenever I start a new terminal:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ImportError: No module named conda
Conda and all the related software and packages work very fine though.
This is my OS config :
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
This is the output of conda info :
active environment : base
active env location : /home/cnemri/anaconda3
shell level : 1
user config file : /home/cnemri/.condarc
populated config files :
conda version : 4.8.0
conda-build version : 3.18.11
python version : 3.7.5.final.0
virtual packages : __glibc=2.27
base environment : /home/cnemri/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/cnemri/anaconda3/pkgs
/home/cnemri/.conda/pkgs
envs directories : /home/cnemri/anaconda3/envs
/home/cnemri/.conda/envs
platform : linux-64
user-agent : conda/4.8.0 requests/2.22.0 CPython/3.7.5 Linux/4.15.0-1065-oem ubuntu/18.04.3 glibc/2.27
UID:GID : 1001:1001
netrc file : None
offline mode : False
How can I not have this error anymore ?
Thank you.
The error has been fixed, I did a conda update conda as advised by #merv and it works very fine. The error disappeared.
Just after I successfully installed Anaconda in Windows (using the official installer), I tried to install a package with conda command. Then, I got the following UnavailableInvalidChannel error:
C:\Users\user>conda install numpy
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: failed
UnavailableInvalidChannel: The channel is not accessible or is invalid.
channel name: pkgs/msys2/repo.anaconda.com/pkgs
channel url: https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs
error code: 404
It seems conda is using wrong channel url, but there is no reference to https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs in my config.
C:\Users\user>conda config --show channels
channels:
- https://repo.anaconda.com/pkgs/
- https://repo.anaconda.com/pkgs/main/win-64/
- defaults
Do you have any idea how to resolve this problem?
Here is my environment:
C:\Users\user>conda info
active environment : None
user config file : C:\Users\user\.condarc
populated config files : C:\Users\user\.condarc
conda version : 4.6.11
conda-build version : 3.17.8
python version : 3.7.3.final.0
base environment : C:\ProgramData\Anaconda3 (read only)
channel URLs : https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs/win-64
https://repo.anaconda.com/pkgs/msys2/repo.anaconda.com/pkgs/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\user\.conda\pkgs
C:\Users\user\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\user\.conda\envs
C:\ProgramData\Anaconda3\envs
C:\Users\user\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
Yet another Import Error issue, I know...
I have been through many posts on stackoverflow about this issue but nothing seem to help
Here is the thing, I am not a windows person, I have used anaconda on mac and Linux for quite a while but now I have to train someone on Python with windows10.
So I tried to install Anaconda, thinking oh well that should be easy...
What I did :
Install miniconda3
Create a conda environment named 'first' - activated it
Install numpy scipy and geopandas (conda install -c conda-forge geopandas)
Start IPython
Typed import geopandas and got an Import Error ModuleNotFoundError: No module named 'geopandas'
Note that Geopandas and all packages appear in the pip list of my environment
So then I Import sys and typed sys.path with this result (sys.executable was fine)
['',
'C:\\Users\\mine\\Miniconda3\\Scripts',
'C:\\Users\\mine\\Miniconda3\\python36.zip',
'C:\\Users\\mine\\Miniconda3\\DLLs',
'C:\\Users\\mine\\Miniconda3\\lib',
'C:\\Users\\mine\\Miniconda3',
'C:\\Users\\mine\\Miniconda3\\lib\\site-packages',
'C:\\Users\\mine\\Miniconda3\\lib\\site-packages\\win32',
'C:\\Users\\mine\\Miniconda3\\lib\\site-packages\\win32\\lib',
'C:\\Users\\mine\\Miniconda3\\lib\\site-packages\\Pythonwin',
'C:\\Users\\mine\\Miniconda3\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\mine\\.ipython']
I believe I should see something about my conda environment in there
c:\users\mine\miniconda3\envs\first\
What did I do wrong? How do I fix it and why do you think that happened? Should I report it to anaconda as it seems to be a pretty annoying thing.
In case that helps :
(first) C:\Users\mine>conda info -a
active environment : first
active env location : C:\Users\mine\Miniconda3\envs\first
shell level : 2
user config file : C:\Users\mine\.condarc
populated config files :
conda version : 4.4.10
conda-build version : not installed
python version : 3.6.3.final.0
base environment : C:\Users\mine\Miniconda3 (writable)
channel URLs : https://repo.continuum.io/pkgs/main/win-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/win-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
package cache : C:\Users\mine\Miniconda3\pkgs
C:\Users\mine\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\mine\Miniconda3\envs
C:\Users\mine\AppData\Local\conda\conda\envs
C:\Users\mine\.conda\envs
platform : win-64
user-agent : conda/4.4.10 requests/2.18.4 CPython/3.6.3 Windows/10 Windows/10.0.16299
administrator : False
netrc file : None
offline mode : False
# conda environments:
#
base C:\Users\mine\Miniconda3
first * C:\Users\mine\Miniconda3\envs\first
sys.version: 3.6.3 |Anaconda, Inc.| (default, Nov 8 ...
sys.prefix: C:\Users\mine\Miniconda3
sys.executable: C:\Users\mine\Miniconda3\python.exe
conda location: C:\Users\mine\Miniconda3\lib\site-packages\conda
conda-build: None
conda-env: C:\Users\mine\Miniconda3\Scripts\conda-env.exe
user site dirs:
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: first
CONDA_PREFIX: C:\Users\mine\Miniconda3\envs\first
CONDA_PREFIX_1: C:\Users\mine\Miniconda3
CONDA_PROMPT_MODIFIER: (first)
CONDA_PYTHON_EXE: C:\Users\mine\Miniconda3\python.exe
CONDA_ROOT: C:\Users\mine\Miniconda3
CONDA_SHLVL: 2
HOMEPATH: \Users\mine
PATH: C:\Users\mine\Miniconda3\envs\first;C:\Users\mine\Miniconda3\envs\first\Library\mingw-w64\bin;C:\Users\mine\Miniconda3\envs\first\Library\usr\bin;C:\Users\mine\Miniconda3\envs\first\Library\bin;C:\Users\mine\Miniconda3\envs\first\Scripts;C:\Users\mine\Miniconda3\envs\first\bin;C:\Users\mine\Miniconda3;C:\Users\mine\Miniconda3\Library\mingw-w64\bin;C:\Users\mine\Miniconda3\Library\usr\bin;C:\Users\mine\Miniconda3\Library\bin;C:\Users\mine\Miniconda3\Scripts;C:\Users\mine\Miniconda3\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\mine\AppData\Local\Microsoft\WindowsApps;
PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PYTHONIOENCODING: 1252
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
You also need to install IPython into your new environment:
conda install ipython
otherwise it uses the ipython form "outside" the environment because it is a command line app and not necessary connected to an environment.
You can check IPython you use with:
where ipython