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
Related
I am using Anaconda to conduct data analysis in Python using Spyder. I've been doing so with no trouble for while now, installing packages, updating packages/Spyder/etc., but after updating Spyder, I now receive an error message when launching Spyder from within Anaconda.
C:\Users\jdoe>chcp 1252
Active code page: 1252
C:\Users\jdoe>call C:\Users\jdoe\Anaconda3\Scripts\activate C:\Users\jdoe\Anaconda3
(base) C:\Users\jdoe>spyder 1>nul 2>nul
This terminal window appears, then closes itself and Spyder along with it.
If I open a terminal window from within Anaconda and type spyder, I am able to launch the app successfully. But launching from Anaconda Navigator fails, and I don't understand this error message or how to fix it, nor have I been able to find anything relating to this issue in searching. Any help understanding what is going on and how to correct this would be appreciated.
conda info report if useful:
(base) C:\Users\jdoe>conda info
active environment : base
active env location : C:\Users\jdoe\Anaconda3
shell level : 1
user config file : C:\Users\jdoe\.condarc
populated config files : C:\Users\jdoe\.condarc
conda version : 4.10.1
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\jdoe\Anaconda3 (writable)
conda av data dir : C:\Users\jdoe\Anaconda3\etc\conda
conda av metadata url : https://repo.anaconda.com/pkgs/main
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 : C:\Users\jdoe\Anaconda3\pkgs
C:\Users\jdoe\.conda\pkgs
C:\Users\jdoe\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\jdoe\Anaconda3\envs
C:\Users\jdoe\.conda\envs
C:\Users\jdoe\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.3 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
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.
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.
[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.
I have different anaconda environments. When starting up one of them it seems as if sys.path is still set to some totally wrong directory. Am I not understanding the concepts of environments correctly or is this an error concerning my anaconda setup?
My environments:
fabianwerner ~$ conda env list
# conda environments:
#
base * /Users/fabianwerner/anaconda3/anaconda3
my-rdkit-env /Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env
openpose /Users/fabianwerner/anaconda3/anaconda3/envs/openpose
fabianwerner ~$
I activate the environment 'openpose':
fabianwerner ~$ conda activate openpose
(openpose) fabianwerner ~$
I will try to import 'keras' so let us make sure that it is installed:
(openpose) fabianwerner ~$ pip list | grep -i keras
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Keras (2.2.4)
Keras-Applications (1.0.7)
Keras-Preprocessing (1.0.9)
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(openpose) fabianwerner ~$
I start python and try to import keras:
(openpose) fabianwerner ~$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'keras'
>>>
Let us check where python looks for modules:
>>> import sys
>>> print(sys.path)
['', '/Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env/lib/python36.zip', '/Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env/lib/python3.6', '/Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env/lib/python3.6/lib-dynload', '/Users/fabianwerner/.local/lib/python3.6/site-packages', '/Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env/lib/python3.6/site-packages']
>>>
so I activated the environment 'openpose' but it still looks for modules in the other (wrong!) environment 'my-rdkit-env'!
How to fix this?
EDIT:
I cannot see any obvious problem with the anaconda setup as conda info -a gives the right path:
(openpose) fabianwerner ~$ conda info -a
active environment : openpose
active env location : /Users/fabianwerner/anaconda3/anaconda3/envs/openpose
shell level : 2
user config file : /Users/fabianwerner/.condarc
populated config files :
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
base environment : /Users/fabianwerner/anaconda3/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/osx-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /Users/fabianwerner/anaconda3/anaconda3/pkgs
/Users/fabianwerner/.conda/pkgs
envs directories : /Users/fabianwerner/anaconda3/anaconda3/envs
/Users/fabianwerner/.conda/envs
platform : osx-64
user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Darwin/17.7.0 OSX/10.13.6
UID:GID : 502:20
netrc file : None
offline mode : False
# conda environments:
#
base /Users/fabianwerner/anaconda3/anaconda3
my-rdkit-env /Users/fabianwerner/anaconda3/anaconda3/envs/my-rdkit-env
openpose * /Users/fabianwerner/anaconda3/anaconda3/envs/openpose
strokinat0r /Users/fabianwerner/anaconda3/anaconda3/envs/strokinat0r
sys.version: 3.7.0 (default, Jun 28 2018, 07:39:16)
...
sys.prefix: /Users/fabianwerner/anaconda3/anaconda3
sys.executable: /Users/fabianwerner/anaconda3/anaconda3/bin/python
conda location: /Users/fabianwerner/anaconda3/anaconda3/lib/python3.7/site-packages/conda
conda-build: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-build
conda-convert: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-convert
conda-develop: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-develop
conda-env: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-env
conda-index: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-index
conda-inspect: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-inspect
conda-metapackage: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-metapackage
conda-render: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-render
conda-server: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-server
conda-skeleton: /Users/fabianwerner/anaconda3/anaconda3/bin/conda-skeleton
user site dirs: ~/.local/lib/python3.6
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: openpose
CONDA_EXE: /Users/fabianwerner/anaconda3/anaconda3/bin/conda
CONDA_PREFIX: /Users/fabianwerner/anaconda3/anaconda3/envs/openpose
CONDA_PREFIX_1: /Users/fabianwerner/anaconda3/anaconda3
CONDA_PROMPT_MODIFIER: (openpose)
CONDA_PYTHON_EXE: /Users/fabianwerner/anaconda3/anaconda3/bin/python
CONDA_ROOT: /Users/fabianwerner/anaconda3/anaconda3
CONDA_SHLVL: 2
PATH: /Users/fabianwerner/anaconda3/anaconda3/envs/openpose/bin:/Users/fabianwerner/anaconda3/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/GIMP-2.10.app/Contents/MacOS
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
(openpose) fabianwerner ~$
Also, I do not seem to have an environment variable set that relates to python:
(openpose) fabianwerner ~$ printenv | grep -i python
CONDA_PYTHON_EXE=/Users/fabianwerner/anaconda3/anaconda3/bin/python
(openpose) fabianwerner ~$
My setup:
Mac OS-X 10.13.6 (High Sierra)
anaconda version 4.5.11
Thanks,
FW
The Python interpreter you started in your example is not the one in the environment.
conda info -a says python version : 3.7.0.final.0 and yet your interpreter says Python 3.6.5
The problem should become apparent when you activate your environment and run which python which should be pointing to the activated env but probably doesn't.
How did you create those environments? Make sure to set the python=XX option or the new environment uses the interpreter from the base/root environment rather than installing a new one. I.e. conda create -n my_environment python=3.7
Edit:
Sorry, I just looked up and tested conda info -a. python version : XX seems to be referring to the base env not the currently active one.
I'm leaving this answer here, since even though my reasoning seems to be wrong, it may still be helpful.