Tried anaconda today , it seems fine but when I tried to launch Spyder each time I get this error: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 6, in <module>
from spyder.app.start import main
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 23, in <module>
from spyder.utils.external import lockfile
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 22, in <module>
import psutil
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 126, in <module>
from . import _pswindows as _psplatform
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 16, in <module>
from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'
Any help regarding this ? Also how do I get python 3.6.3 in anaconda..?
The problem is you have two Python versions installed in your system: one in C:\ProgramData\Anaconda3\ and the other in C:\Users\Jaker\AppData\Roaming\Python\Python36.
Please uninstall one of them and the problem will be solved.
Related
I am trying to plot with geopandas with this [tutorial][1]. However, whenever I run this: I find following errors:
Traceback (most recent call last):
File "/home/mahin/PycharmProjects/ProfessorEick-20191013T041703Z-001/ProfessorEick/KernelDensity2D/GeoPandasPlot.py", line 2, in <module>
import geoplot
File "/home/mahin/miniconda3/lib/python3.7/site-packages/geoplot/__init__.py", line 1, in <module>
from .geoplot import (
File "/home/mahin/miniconda3/lib/python3.7/site-packages/geoplot/geoplot.py", line 17, in <module>
import contextily as ctx
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/__init__.py", line 7, in <module>
from .place import Place, plot_map
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/place.py", line 6, in <module>
from .tile import howmany, bounds2raster, bounds2img, _sm2ll, _calculate_zoom
File "/home/mahin/miniconda3/lib/python3.7/site-packages/contextily/tile.py", line 20, in <module>
from rasterio.io import MemoryFile
ModuleNotFoundError: No module named 'rasterio.io'
I have tried installing rasterio using conda from the following link and also using the following instructions. However, the problem still exists. Anybody knows what could be the reason? My operating system is Ubuntu 18.06, I am running the code using pyccharm and my python version is 3.7.
I installed the anaconda 64 bit on windows 10. I can launch the prompt but when I try to open navigator thru the icon or thru prompt, I'm getting the error below. Can someone help me?
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main())
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 103, in main
from anaconda_navigator.app.start import start_app
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 37, in <module>
from anaconda_navigator.utils.analytics import GATracker
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\utils\analytics.py", line 44, in <module>
from anaconda_navigator.external.UniversalAnalytics import Tracker
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\external\UniversalAnalytics\Tracker.py", line 28, in <module>
from six.moves.urllib.request import (HTTPSHandler, Request, build_opener,
ImportError: cannot import name 'HTTPSHandler' from 'six.moves.urllib.request' (unknown location)
Also, Spyder is also not launching. I can launch Jupyter and prompt.
I tried to install the Anaconda (Python 3.7 version) on Windows 10 and I was facing the following error:
(base) C:\Users\***>anaconda-navigator Traceback (most recent call last): File "C:\Users\***\anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main()) File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 103, in main
from anaconda_navigator.app.start import start_app File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 39, in <module>
from anaconda_navigator.utils.analytics import GATracker File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\utils\analytics.py", line 44, in <module>
from anaconda_navigator.external.UniversalAnalytics import Tracker File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\external\UniversalAnalytics\Tracker.py", line 28, in <module>
from six.moves.urllib.request import (HTTPSHandler, Request, build_opener, ImportError: cannot import name 'HTTPSHandler' from 'six.moves.urllib.request' (unknown location)
I did the solution explained here and it worked.
Error printed is related to ssl library and its natural for people to go and try reinstalling openssl library. But to fix this below steps have to be followed. Just now tried and confirmed this is working.
Copy the following files:
libcrypto-1_1-x64.* (.dll and .pdb files)
libssl-1_1-x64.* (.dll and .pdb files)
From D:\Anaconda3\Library\bin to D:\Anaconda3\DLLs.
Same issue is described in anacondas github page.
For me it works after installing "Win64 OpenSSL v1.1.1d Light"
While python3 expects modules to be in /usr/local/lib/python3.4, pip3 installs them in /usr/local/lib/python3.4/dist-packages. This results in python3 not finding packages that pip3 says are installed.
I tried cutting and pasting the stuff in /usr/local/lib/python3.4/dist-packages to /usr/local/lib/python3.4, but I end up with weird errors, like this:
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
File "/usr/local/lib/python3.4/Cython/Build/__init__.py", line 1, in <module>
from .Dependencies import cythonize
File "/usr/local/lib/python3.4/Cython/Build/Dependencies.py", line 51, in <module>
from ..Compiler.Main import Context, CompilationOptions, default_options
File "/usr/local/lib/python3.4/Cython/Compiler/Main.py", line 30, in <module>
from .Symtab import ModuleScope
File "/usr/local/lib/python3.4/Cython/Compiler/Symtab.py", line 18, in <module>
from . import PyrexTypes
File "/usr/local/lib/python3.4/Cython/Compiler/PyrexTypes.py", line 17, in <module>
from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
ImportError: /usr/local/lib/python3.4/Cython/Compiler/Code.cpython-34m.so: undefined symbol: PyFPE_jbuf
What do I do now? I'm on Linux Mint Cinnamon 64-bit.
[EDIT]
This problem was a complete mess and I still have no clue what happened before. I have given up trying to get Python to work, as I have found an application that does the same thing as the Python application I was trying to get working. It's such a pain.
I just cannot use jupyter notebook. I have updated to the most recent version by ananota, and it still does not work.
The error message is listed below:
C:\Users\willian>jupyter notebook
Traceback (most recent call last):
File "C:\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in <module>
import notebook.notebookapp
File "C:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 40, in <module>
ioloop.install()
File "C:\Anaconda3\lib\site-packages\zmq\eventloop\ioloop.py", line 207, in install
from tornado import ioloop
File "C:\Anaconda3\lib\site-packages\tornado\ioloop.py", line 47, in <module>
from tornado.concurrent import TracebackFuture, is_future
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 34, in <module>
from tornado.util import raise_exc_info, ArgReplacer, is_finalizing
ImportError: cannot import name 'is_finalizing'
From your error it looks like the tornado package is not installed in your environment. Installing tornado with the command below should fix your problem.
pip install tornado
I have installed pymc using easy_install pymc command. While I try to import the package using import pymc.
I am getting following errors :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/__init__.py", line 29, in <module>
from .CommonDeterministics import *
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/CommonDeterministics.py", line 21, in <module>
from .utils import safe_len, stukel_logit, stukel_invlogit, logit, invlogit, value, find_element
File "/usr/local/lib/python2.7/dist-packages/pymc-2.3.2-py2.7-linux-i686.egg/pymc/utils.py", line 14, in <module>
from . import flib
ImportError: libatlas.so.3gf: cannot open shared object file: No such file or directory
I am using Ubuntu 12.04 and Python 2.7.
What is the reason for these errors?
Try installing that missing library:
apt-get install libatlas3-base-dev