importerror

Trouble importing module in Python 2.7

和自甴很熟 提交于 2020-01-06 07:20:50
问题 My Mac computer has Python 3.6 and Python 2.7 and I have successfully installed the basic modules such as numpy, scipy and matplotlib, for example, by doing the routine pip install and pip3 install. My Python 3.6 works totally well in Anaconda-Jupiter-Notebook, IDLE and Terminal, while Python 2.7 works only in terminal but not in IDLE. Then for version check I tried pip --version Returning: pip 10.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip

Python: Import excel file using relative path

懵懂的女人 提交于 2020-01-06 06:10:15
问题 I tried to import an excel file which is not within the same folder than the script. I need to get one folder above, then into another folder (B_folder) and there is file 2_file.xlsx I tried: df = pd.read_excel(r'..\B_folder\2_file.xlsx') and got: FileNotFoundError: [Errno 2] No such file or directory: '..\\B_folder\\2_file.xlsx' also tried: foreslash instead of backslash without the 'r' before path but I always get the error message above or this one: OSError: [Errno 22] Invalid argument: '.

getting error while importing cv2 module in ubuntu amazon instance

旧巷老猫 提交于 2020-01-06 05:50:06
问题 getting error while doing this import cv2 python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' Segmentation fault (core dumped) import cv2 python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' Segmentation fault (core dumped) 回答1: perhaps CUDA was not installed properly check it 来源: https://stackoverflow.com/questions/56347458/getting-error-while

lmfit package ImportError: cannot import name differential_evolution

邮差的信 提交于 2020-01-06 05:42:06
问题 As the title I'm duelling just with the import of the package lmfit which does not want to load. I just called the interpreter and then typed import lmfit but the import does not seem to go in the right direction, and I get this message of error Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/lmfit/__init__.py", line 42, in <module> from .confidence import conf_interval, conf_interval2d File "/Library/Python/2.7/site-packages

How to fix ImportError in matplotlib

半世苍凉 提交于 2020-01-06 02:49:13
问题 I compiled matplotlib on a mac running snow leopard only to find that when I import matplotlib.pyplot I get the following error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py", line 6, in <module> from matplotlib.figure import Figure, figaspect File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 18, in

After upgrading to Numpy 1.8.2, ImportError: cannot import name multiarray

こ雲淡風輕ζ 提交于 2020-01-03 21:01:56
问题 I just upgraded to Numpy 1.8.2 on my 64-bit Windows machine using Anaconda's Spyder. I used the command: conda update numpy It installed it. Before that I had numpy 1.7.1, and I also have a 32-bit version of anaconda spyder in another path, but I 've taken it out of the system PATH variable. Now the issue is that as soon as I try to run any code, I get an error that ends in: from . import multiarray ImportError: cannot import name multiarray One of the first imports in ___init___.py for numpy

ImportError: Entry point ('console_scripts', 'pip') not found on Mac

南楼画角 提交于 2020-01-03 16:53:04
问题 I got the message You are using pip version 8.0.2, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. When I try to install a package through pip. I followed the instruction and upgrade pip with pip install --upgrade pip . Now I'm getting an error with pip, even with pip --version to check the version of pip. Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in <module> load_entry_point('pip==8.0.2', 'console

pycuda ImportError in pycuda.driver

北慕城南 提交于 2020-01-03 12:35:31
问题 I'm trying to compile some sources for working with my GPU. I use pycuda for this. When I compile source code, I receive some errors from Python: C:\Users\Dmitriy\wcm>python ws_gpu.py test.dcm Traceback (most recent call last): File "ws_gpu.py", line 2, in <module> import pycuda.gpuarray as gpu File "C:\Python27\lib\site-packages\pycuda\gpuarray.py", line 3, in <module> import pycuda.elementwise as elementwise File "C:\Python27\lib\site-packages\pycuda\elementwise.py", line 33, in <module>

Python: “ImportError: DLL load failed: The specified module could not be found.” Problems when importing ffn (finance library for python)

半城伤御伤魂 提交于 2020-01-03 04:09:07
问题 Apologies if there does in fact exist a thread that has already figured this out (I've spent a few hours attentively searching multiple sites and the GitHubs for the dependencies that seem to cause the problems), however each solution seemed fairly specific to the particular library that so and so was attempting to use. I've been messing around with quantitative finance/ algorithmic trading and have been trying to import a particular library ffn , however, per the question title, I've been

Imported Failed: Cannot convert SQL type 2005==> during importing CLOB data from Oracle database

筅森魡賤 提交于 2020-01-02 23:13:15
问题 I am trying to import a Oracle table's data with CLOB data type using sqoop and it is failing with the error Imported Failed: Cannot convert SQL type 2005 . I am using Running Sqoop version: 1.4.5-cdh5.4.7 . Please help me how to import CLOB data type. I am using the below oozie workflow to import the data <workflow-app xmlns="uri:oozie:workflow:0.4" name="EBIH_Dly_tldb_dly_load_wf"> <credentials> <credential name="hive2_cred" type="hive2"> <property> <name>hive2.jdbc.url</name> <value>$