Circular dependency issue - Python - macos

I am a newbie to Python, and I have an issue that I believe is due to circular dependencies, but I have been unable to resolve it.
How can I figure out where the circular dependency is occurring, and what can I do to resolve this error (please find the terminal output below): (I use OsX Yosemite, if that helps)
python l3_l0.py
Traceback (most recent call last):
File "l3_l0.py", line 18, in <module>
import geopandas as gpd
File "build/bdist.macosx-10.10-intel/egg/geopandas/__init__.py", line 6, in <module>
File "build/bdist.macosx-10.10-intel/egg/geopandas/geoseries.py", line 12, in <module>
Thank you!

Uninstall conflicting dependencies in the order of installation, and reinstall them in the correct order. This seems to the simplest solution, and it worked for m!

Related

ModuleNotFoundError: No module named 'pymatting_aot.aot'

I'm on Windows and I work with python 3.8.
If I execute a python script where libraries need to be compiled, I will get the following error:
Failed to import ahead-of-time-compiled modules.
This is expected on first import.
Compiling modules and trying again.
This might take a minute.
Traceback (most recent call last):
File "C:\Users\...\env\lib\site-packages\pymatting_aot\cc.py", line 36, in <module>
import pymatting_aot.aot
ModuleNotFoundError: No module named 'pymatting_aot.aot
I already installed pymatting with pip.
Does anybody now a solution to solve this error?

Class RunLoopModeTracker is implemented in both locations. Can't open Spyder

I have no idea what I'm doing.
MacOS Version 10.13.4 and Python 3.7.3
I had anaconda installed and was using spyder fine, but I thought I'd install spyder-terminal using command pip install spyder-terminal because I thought that's how I'd get the terminal to show? Anyways now when I try opening spyder, I get this error:
objc[1685]: Class RunLoopModeTracker is implemented in both /anaconda3/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x117d8e270) and /anaconda3/lib/libQt5Core.5.dylib (0x11fabda80). One of the two will be used. Which one is undefined.
Traceback (most recent call last):
File "/anaconda3/bin/spyder", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 186, in main
from spyder.app import mainwindow
File "/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 90, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/anaconda3/lib/python3.7/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name
I tried uninstalling anaconda and then re-installing/updating and re-installing spyder, but I'm still unable to open. Anyone know how to fix this?

What does this stack trace tell me is wrong with my Tensorflow Installation

I have went through and installed CUDA, cuDNN, an followed the instructions to the best of my ability. I have added the environment variables I believe I need, but I still seem to have problems.
I have come as far as testing to see if tensorflow has been installed correctly. When pull up a command prompt, type python to use the shell, I type import tensorflow as tf.
I then get this stack trace, something I cannot make sense of to solve the problem myself. This is where I need the communities help:
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
File"C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "C:\Users\Troy\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
% (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
Please try installing CUDA 9.0. the problem should be with the CUDA 9.1 version. You can download the driver from the following link : CUDA Toolkit 9.0
To uninstall CUDA:
Please run the following commands :
sudo apt-get --purge remove cuda
sudo apt autoremove
These commands should be able to uninstall cuda from your system.
If you have the cuDNN configured to work with GPU:
You can remove them just my deleting the files in the directories that you have copied to, during its setup.

Error with tensorboard on Mac

I have recently installed tensorflow, and it seems working fine until I was trying to display computing graph using tensorboard. I got the following error:
python /usr/local/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py --logdir=/tmp/basic/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py", line 13, in <module>
import tensorflow.python.platform
File "/usr/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 13, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in <module>
serialized_pb=_b('\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"d\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tb\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'syntax'
Any suggestion about how to solve the problem?
This looks like a TensorBoard bug rather than a usage issue. Could you file a bug against it on our Github?
It will be way easier for us to track it down if you can give us a clean repro, including:
- How you installed TensorFlow
- The events file that triggers this bug
The issue you're encountering is related to the latest code from master; most people install from pip, but I've been seeing a few issues where people's pip installations are somehow sucking in new code from master. Are you intending to use cutting-edge unreleased source from our master branch, or did you install e.g. version 0.7.1 and are surprised that you have unstable code?

Setting up OCR tool in python

I am a complete code novice. I am trying to teach myself python and so far I've been able to do rudimentary scripting. I want to try and learn how to use an OCR which might be somewhat advanced for me, but I'm doing it for fun so I have all the time in the world.
I'm trying to set up pytesser and I understand I need to download both the pytesser module and a PIL. I think there is a problem with how I'm storing my files.
Right now my PIL directory is located in:
C:\Python27\Lib\site-packages
and my pytesser_v0.01 directory is located in:C:\Python27\Lib\site-packages
I try to do the basic test found here
And I keep getting the following error
>>> from pytesser import*
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pytesser
I think this is a very simple question because I keep looking to where to install my PIL and pytesser directories and every online forum/help starts by saying "install it" and not where.
Edit:
I found the correct place to install pytesser but now i'm getting the following errors. The first problem was solved by making sure that pytesser, util, errors and tesseract.exe were in the site-package file and the program didn't have to go into the pytesser folder.
>>> image = Image.open('fnord.tif')
>>> print image_to_string(image)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pytesser.py", line 30, in image_to_string
util.image_to_scratch(im, scratch_image_name)
File "C:\Python27\lib\site-packages\util.py", line 7, in image_to_scratch
im.save(scratch_image_name, dpi=(200,200))
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1433, in save
fp = __builtin__.open(fp, "wb")
IOError: [Errno 13] Permission denied: 'temp.bmp'

Resources