I am using 32-bit Python 2.7. I believe I have successfully installed Scrapy and all the dependencies. When I type scrapy version in the cmd prompt, it shows the version. But when I try to scrape the home page of Wikipedia for testing, this is the output:
The last few lines go as follows :
C:\...\Python27\lib\site-packages\IPython\frontend,py:30: UserWarning: The top-level 'frontend' package has been deprecated. All its subpackages have been moved to the top 'IPython' level.
warn<"The top-level 'frontend' package has been deprecated.
In[1]:"
Note: I have installed IPython and its dependencies. And I have no idea what "frontend" and "deprecated" mean? Any idea of how to solve this? Thanks.
Related
I am importing plotly.offline in my basic.py file, but when i run this basic.py in the platform-ide-terminal, an error comes up and says, ImportError: No module named plotly.offline.
I am sure plotly is pip installed. When i checked it in the default Terminal in my Mac,
pip show plotly
it reads,
Name: plotly
Version: 4.3.0
Summary: An open-source, interactive graphing library for Python
Home-page: https://plot.ly/python/
Author: Chris P
Author-email: chris#plot.ly
License: MIT
Location: /Users/Lorentz/opt/anaconda3/lib/python3.7/site-packages
Requires: retrying, six
Required-by: dash, chart-studio
My default python in Terminal is 3.7.
So i am trying to set the default python of my Atom to 3.7. I googled and my answers are suggesting to set it through Atom→Preferences→Open Config Folder, and open.atom/packages/script/lib/grammars/python.coffee. This is from the official site https://atom.io/packages/script
But my problem is, under packages, i can't locate script.
i then tried to locate it from top menu, still no luck.
Would anyone please tell me where to locate the python.coffee file? or where actually is this "script"?
Go here and search for script. When it is found click install. Or go here and click install.
There is a file named init.coffee in the home/.atom directory. I don't know of a python.coffee file.
I installed selenium through the command line and imported the library on Intellij. At first glance, it seems to be fine, because the software returns "unused import statement" Unfortunately when I use the module in any way it returns an error. No module named 'selenium'
I tried to pip install selenium again, and got
Requirement already satisfied: selenium in
c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages
This is the code I was trying to run:
import selenium
help(selenium)
which returns the same error. It does not say the module does
not exist before
I run the code like it would if I would just write random import.
You need to ensure the project interpreter for this project is configured to use your system Python. The JetBrains documentation for doing this is here. In IntelliJ, essentially you need to go to the project structure settings and configure the Python SDK for the project or module (whichever is needed).1
1 Instructions will vary if you are using a different JetBrains IDE than IntelliJ, but this is what you specified in your question.
I've tried unsuccessfully to get scip running with python. I'm using Yosemite (10.10.3), python 2.7 and have installed scip optimization suit (http://scip.zib.de/download.php?fname=scipoptsuite-3.1.1.tgz) with make.
I can start scip after the installation via the terminal.
sages-MBP:~ sage$ scip SCIP version 3.1.1 [precision: 8 byte] [memory: block] >[mode:optimized][LP solver: SoPlex 2.0.1] [GitHash: bade511]
But when I try to use import scip in python there appears the message
No module named scip
The same error message appears for from zibopt import scip
If I print the system path with print sys.path in python, the folder scipoptsuite-3.1.1/scip-3.1.1/bin is included where the file
scip-3.1.1.darwin.x86_64.gnu.opt.spx is situated.
Is it possible that the reason for the error message is that I haven't linked correctly necessary libraries?
Or which folders have to be included in the pythonpath to get scip working?
I Hope someone can help me out!
You need to install the python interface that comes with SCIP. Go to scip/interfaces/python/ and read the instructions in README and INSTALL. This interface is using Cython to communicate with the C-Code of SCIP.
make will only install the native Linux or Mac binaries/libraries.
The environment variable DYLD_LIBRARY_PATH needs to be set to contain the lib/ directory of the SCIPoptSuite installation (see comment by #саша)
Recently I installed Mac OS Yosemite. Until then I had no problem in installing libraries and have already installed beautiful soup, pydelicious, etc. After the installation of Yosemite, I tried to install Mechanize and Requests Libraries in mac. There was no problem in their installation. I could import them and use them from the Terminal. However, Xcode 6.1 doesn't load them/seeing them. I consistently get the
ImportError: No module named mechanize
ImportError: No module named requests
error messages.
I have already tried changing the file permissions with full access to the user but to no avail.
I also checked PYTHONPATH and .profile files, so far no luck.
I wonder, if any has encountered this problem or if any one know of some fix to this problem?
Apparently Xcode was referring to my default of Python.
After the comment from Droppy, I checked my python version by using
which python
I copy pasted the result in the Xcode Program scheme. Now it works...!
Thanks for all the help.
New to Python and Scrapy. I need these modules apparently to run scrapy properly. I downloaded Zope interface as suggested and have been attempting to install using easy_install as per instructions on Scrapy. I'm running Windows 7 64 and first downloaded the 64 bit version of Pyton 2.7 and all modules including Zope. That didn't work, so I unistalled everything and downloaded the 32 bit versions, but I'm having the same problem. Clearly, I'm doing something very basic incorrectly. Would appreciate assistance.
This is what happens:
C:>easy_install zope.interface-4.0.3-py2.7-win32.egg
I get a whole bunch of results (which stackoverflow doesn't let me copy/paste even though I'm properly formatting it as code) that says at the end:
No local packages or download links found for zope.interface-4.0.3-py2.7-win32.egg
I know I need zope, because when I try and run srapy, I receive the following error (also other results):
C:>scrapy shell http://www.yahoo.com
raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.
As I said, I'm real new at this and having a tough time with all the modules and packages needed to get going.
easy_install and pip install take package names, not the filename.
so the correct invocation would be
easy_install zope.interface
which will fetch the latest version. If you specifically want that version
easy_install "zope.interface==4.0.3"
You can usually find package names by googling, eg. pypi zope interface
I've spent an absurdly long time trying overcome the zope problems when installing scrapy and just found a solution!
I just followed step 7 here (as Talvalin suggested)
http://steamforge.net/wiki/index.php/How_to_Install_Scrapy_in_64-bit_Windows_7
Then, in my site-packages location I just changed the name of the egg file "zope.interface-3.8.0-py2.7-win-amd64.egg" to "zope". All worked fine after that.
Hope this helps somebody!