importerror

Android Studio cannot resolve symbol 'TabLayout'

眉间皱痕 提交于 2019-11-27 14:31:41
问题 Cannot resolve symbol TabLayout ? How to clear this error? Please help me. I already imported import android.support.design.widget.TabLayout; 回答1: Had a similar problem, to fix this in Android Studio (AS) I went Build->Clean Project and AS sorted everything out. Make sure in your build.gradle file under dependencies that you have: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:your_api_version_number.0.0' compile 'com.android.support

Import urllib.request, ImportError: No module named request

我的未来我决定 提交于 2019-11-27 13:33:51
问题 I am trying to import urllib.request for python 2.7.10 on PyCharm 4.5.4 on Window 10 but getting the error "ImportError: No module named request". 回答1: The urllib.request modules have been deprecated .. just use import urllib And for your function if you were earlier writing say urllib.request.urlretrieve Now you just write urllib.urlretrieve 回答2: I have also faced the same error and Googled to solve it. urlib.request is for Python 3.0. You may use the code below: import urllib urllib.urlopen

ImportError: No module named six

两盒软妹~` 提交于 2019-11-27 11:37:37
I'm trying to build OpenERP project, done with dependencies. It's giving this error now Traceback (most recent call last): File "openerp-client.py", line 105, in <module> File "modules\__init__.pyo", line 23, in <module> File "modules\gui\__init__.pyo", line 22, in <module> File "modules\gui\main.pyo", line 33, in <module> File "rpc.pyo", line 29, in <module> File "common\__init__.pyo", line 22, in <module> File "common\common.pyo", line 26, in <module> File "tools\__init__.pyo", line 28, in <module> File "dateutil\relativedelta.pyo", line 12, in <module> ImportError: No module named six Could

undefined symbol: PyExc_ImportError when embedding Python in C

ⅰ亾dé卋堺 提交于 2019-11-27 07:58:09
问题 I'm developing a C shared library that makes a call to a python script. When I run the application I get this error: Traceback (most recent call last): File "/home/ubuntu/galaxy-es/lib/galaxy/earthsystem/gridftp_security/gridftp_acl_plugin.py", line 2, in <module> import galaxy.eggs File "/home/ubuntu/galaxy-es/lib/galaxy/eggs/__init__.py", line 5, in <module> import os, sys, shutil, glob, urllib, urllib2, ConfigParser, HTMLParser, zipimport, zipfile File "/usr/lib/python2.7/zipfile.py", line

How can I troubleshoot Python “Could not find platform independent libraries <prefix>”

允我心安 提交于 2019-11-27 07:45:35
I'm trying to use Fontcustom to create an icon font using svg files and fontforge. I'm on OSX.7. However, whenever I run the program I get the error Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] ImportError: No module named site` As a Python/Unix newbie I don't even know where to start trying to solve this. Can anyone offer any advice? What are <prefix> and <exec_prefix> referring to? When I type python --version I get Python 2.7.1 . And in the directory /System/Library

Installing OpenCV for Python on Ubuntu, getting ImportError: No module named cv2.cv

﹥>﹥吖頭↗ 提交于 2019-11-27 06:31:21
I have an Ubuntu 14.04 system, on which I want to install OpenCV and use it with Python 2.x. I installed OpenCV using the instructions here: https://help.ubuntu.com/community/OpenCV The install seemed to run properly, no errors, the script ended with output OpenCV 2.4.9 ready to be used When I try to run the sample Python script, I get the following: $ python opencv.py Traceback (most recent call last): File "opencv.py", line 1, in <module> from cv2.cv import * ImportError: No module named cv2.cv I suspect I know why, I just don't know how to fix it. OpenCV installed to the current directory I

ImportError: No module named 'psycopg2._psycopg'

橙三吉。 提交于 2019-11-27 05:58:05
问题 When I try to import psycopg2 it show below log for me: Traceback (most recent call last): File "D:/Desktop/learn/python/webcatch/appserver/testpgsql.py", line 2, in <module> import psycopg2 File "D:/Desktop/learn/python/webcatch/appserver/webcatch/lib/site-packages/psycopg2-2.6.1-py3.5-win32.egg/psycopg2/__init__.py", line 50, in <module> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: No module named 'psycopg2._psycopg' How can I solve it? My platform is

PyCharm: ImportError no module named X?

雨燕双飞 提交于 2019-11-27 04:54:25
问题 X in this example represents any module or package you install. The problem : I have a problem with a package called 'X' . In PyCharm I get an error ImportError: No module named 'X'. My code runs from the terminal without any problem. Any help ? or I installed X on python3.4 with pip. In terminal, when I import X , everything is fine, but when I import it in PyCharm, it says: ImportError: No module named 'X'" . Any help ? This is basically everyday question, just with different module or a

Cannot import Scikit-Learn

半世苍凉 提交于 2019-11-27 04:37:56
问题 I tried to install scikit-learn on my Linux Mint 12 but failed. I downloaded the package from http://pypi.python.org/pypi/scikit-learn/ and installed with sudo python2.7 setup.py install I then changed the directory to home and started python2.7 shell. On importing sklearn I got: >>> import sklearn /usr/lib/python2.7/dist-packages/scipy/spatial/__init__.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility from ckdtree import * /usr/lib/python2.7/dist-packages

Setting up a virtualenv: No module named 'pip'

给你一囗甜甜゛ 提交于 2019-11-27 02:39:19
问题 I have a fresh install of Python 3.3.4 on a Windows Server 2008 R2 machine. I've successfully installed the latest versions of Setuptools, Pip and Virtualenv globally: python ez_setup.py easy_install pip pip install virtualenv Now when I try to set up a virtualenv using virtualenv ENV I get the following stack trace: New python executable in ENV\Scripts\python.exe Installing setuptools, pip... Complete output from command [path redacted]\ENV\Scripts\python.exe -c "import sys, pip; sys...d\"]