I'm new to python and the virtual environment stuff. I'm facing issues opening jupyter notebook and Spyder after updating conda.
Here are some info about the versions I have:
$ conda info
active environment : None '''is it caused by this ? '''
user config file : /Users/-/.condarc
populated config files : /Users/-/.condarc
conda version : 4.5.4
conda-build version : 3.0.27
python version : 2.7.14.final.0
base environment : /Users/-/anaconda2 (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/-/anaconda2/pkgs
/Users/-/.conda/pkgs
envs directories : /Users/-/anaconda2/envs
/Users/-/.conda/envs
platform : osx-64
user-agent : conda/4.5.4 requests/2.18.4 CPython/2.7.14 Darwin/15.5.0 OSX/10.11.5
UID:GID : 501:20
netrc file : None
offline mode : False
JupyerNotebook version : 5.5.0
Jupyter version : 4.4.0
Spyder version : 3.2.8
Spyder fails to launch and when trying to launch spyder from anaconda navigator I get this error:
/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/init.py", line 6, in
from . import (constants, error, message, context,
ImportError: dlopen(/Users/-/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/error.so, 2): Library not loaded: #rpath/libsodium.23.dylib
Referenced from: /Users/-/anaconda2/lib/libzmq.5.dylib
Reason: image not found
Trying to launch jupyter notebook from anaconda throws the same image not found error:
/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/init.py", line 6, in
from . import (constants, error, message, context,
ImportError: dlopen(/Users/-/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/error.so, 2): Library not loaded: #rpath/libsodium.23.dylib
Referenced from: /Users/-/anaconda2/lib/libzmq.5.dylib
Reason: image not found
I found out that after updating, a new Anaconda2 folder was initialized for only the zmq file /anaconda2/lib/python2.7/site-packages/zmq/backend/cffi/__pycache__.
Everything was working smoothly but after following anaconda instructions and recommendations to update I started getting those errors.
How can I resolve this issue? Is it because the active environment : None?
Faced same issue. From https://github.com/jupyter/notebook/issues/1632 it explained that some dependencies when updating conda are messed up so try:
conda remove zeromq
conda install zeromq
Then try:
conda update conda-build
Good luck,
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
[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.
For an upcoming research project I am going to need to use Python with GIS data (mostly rasters). I have experience using Matlab and R; however, Python is still a relative unknown to me. I've been able to get Anaconda on my machine and download the requisite packages I needed and import them successfully (e.g. Richdem); however, gdal has been a continuous pain.
import gdal
in Spyder results in...
ImportError: dlopen(/Users/matthew/anaconda3/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-darwin.so, 2): Library not loaded: #rpath/libfontconfig.1.dylib
Referenced from: /Users/matthew/anaconda3/lib/libpoppler.78.dylib
Reason: Incompatible library version: libpoppler.78.dylib requires version 14.0.0 or later, but libfontconfig.1.dylib provides version 13.0.0
I have tried:
1) updating conda
2) updating anaconda
3) updating python
4) installing GDAl through pip
5) reinstalling GDAL with conda-forge
conda list gdal
# Name Version Build Channel
gdal 2.4.1 py36h7eb7563_3 conda-forge
libgdal 2.4.1 h1405c63_3 conda-forge
conda info
active environment : None
user config file : /Users/matthew/.condarc
populated config files : /Users/matthew/.condarc
conda version : 4.6.14
conda-build version : 3.17.8
python version : 3.6.8.final.0
base environment : /Users/matthew/anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /Users/matthew/anaconda3/pkgs
/Users/matthew/.conda/pkgs
envs directories : /Users/matthew/anaconda3/envs
/Users/matthew/.conda/envs
platform : osx-64
user-agent : conda/4.6.14 requests/2.22.0 CPython/3.6.8 Darwin/17.6.0 OSX/10.13.5
UID:GID : 501:20
netrc file : None
offline mode : False
I've spent several hours googling and looking around the Stack Exchange before posting here. I would love some insights and any thoughts anyone may have on how to resolve this issue.
I see this is an old question but hopefully it helps others. The proper import would be
from osgeo import gdal
rather than
import gdal
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
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
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)