I can't open scrapy shell in terminal - python

I installed scrapy with
pip install scrapy
and it was installed successfully, I can import it in my script and it works.
However, when I use scrapy shell "https://www.google.com" on Windows CMD with Python3 it gives me the following error:
ModuleNotFoundError: No module named 'win32api'
So I tried
pip install win32api
Could not find a version that satisfies the requirement win32api
(from versions: ) No matching distribution found for win32api
How can I fix this error and use scrapy's shell?
Note: I'm using Windows 10 and python 3.7.2.

You need pywin32 installed because of this Twisted bug.
Install it with
pip install pypiwin32

Try to install pywin32:
pip install pypiwin32

Related

How to install win32gui on anaconda on macOS

I am getting the error 'ModuleNotFoundError: No module named 'win32gui''. Please brief me the instructions on how can I resolve this issue on my anaconda on mac.
You must install it from the version hosted on the pip package manager. You can do this with the following command:
pip install win32gui

ImportError: DLL load failed while importing cv2: The specified module could not be found in pycharm with python 3.9

I have already installed opencv-python library but when i import it into the the compiler it does not work. I have also tried to install it using pip install opencv-python but it says Requirement already satisfied:. Which means that library is installed but still not works. I am using pycharm community edition and python 3.9.
try to install this
pip install opencv-python-headless

Not able to install skbuild

I am trying to install "CMake" with command
pip3 install CMake.
Its gives an error for a module "skbuild"
from skbuild import setup, ModuleNotFoundError: No module named 'skbuild'
But but when tried to install skbuild with command
pip3 install skbuild
it gives error
"Could not find a version that satisfies the requirement skbuild (from versions: ) No matching distribution found for skbuild".
I am not able to solve this error. Please help. I trying the implementation it on Window 10. Using Python 3.7.0. I tried couple of versions of pip3 (10.0.1, 9.0.3, 9.0.2, 9.0.1). Nothing is working.
Try pip install scikit-build. For me, pip install cmake works properly afterwards.
this worked for me while installation of this github repo https://github.com/ultralytics/yolov3
# For pip
pip install scikit-build
# For pip3
pip3 install scikit-build
There are pre-compiled binaries available on THIS page for Windows as MSI packages and ZIP files. You can find the one for the OS you are using.
If you want to proceed with your current approach then can you can probably refer THIS LINK

installing wx gizmos for python on windows

I've installed wx for python on windows with
pip install wxpython
The python script I'm using tries to import wx.gizmos. The program fails there with error "No module names gizmos". So i've tried to install it with
pip install gizmos,
pip install wxgizmos,
pip install wx.gizmos,
pip install wxpython.gizmos,
pip install wxpythongizmos.
Error is "No matching distribution found for..."
I've been to https://wxpython.org/Phoenix/docs/html/main.html and it appears gizmos is not there and so can't be used but the python script needs it.
Is there a way of installing this or a way arond this ?
I uninstalled python wx using:
pip uninstall wxpython.
and reinstalled it from here:
https://sourceforge.net/projects/wxpython/files/wxPython/2.9.5.0/wxPython2.9-win64-2.9.5.0-py27.exe/download

Python 3.5 Pyperclip module import failure

Just started learning Python. And i'm having trouble using the Pyperclip module.
When I tried to use the pip install pyperclip in the command line, it shows up this error:
pip install pyperclip
^
SyntaxError: invalid syntax
I am running Python 3.5 (32 bit) on a Windows 7 desktop.
open command prompt
type: pip install pyperclip
if this doesn't work then do this use
cd Python35/Scripts to get to the scripts folder
This is the folder where pip is located.
Now type: pip install pyperclip
This will download and install pyperclip
now type: pip freeze
And pyperclip should be listed
If you want to test in python shell remember to close the shell(if open) and open new one because it needs to load the new package.
type in python shell: import pyperclip
it should accept it and now you can pyperclip.copy() and pyperclip.paste()
Good luck!
sudo pip3 install pyperclip
did the trick for me
pip install ... is not python code. You have to run it from the terminal/command prompt.
This method is better:
Download the zip file of the pyperclip from
https://pypi.python.org/packages/8b/4b/8ab1608291f863c501b02af3a607ae43e8e7134a266804b4c8c452feb84f/pyperclip-1.5.7.zip#md5=678e42420aa569b15e82636dc73ed7c5
Extract the file and copy to
C:\Users\YourUserName\AppData\Local\Programs\Python\Python36-32\lib
Copy the pyperclip the python file into the lib folder
Try the import pyperclip on the python shell again.
I guess you are good to go
For me, this installed pip at C:\Users\YourUserName\AppData\Local\Programs\Python\Python36-32\Scripts\pip.exe.
Find pip.exe on your computer, then add its folder (for example, C:\Users\YourUserName\AppData\Local\Programs\Python\Python36-32\Scripts) to your path (Start / Edit environment variables).
Now you should be able to run pip from the command line. Try installing a package;
Open default commandline and type:
pip install pyperclip
Could be that you are using "Jupyter notebook" ? . Jupyter doesn't support all the modules in python like (tkinter , pyperlip .. and much more others)
Don't Write it inside python.exe
Just open the command prompt and write pip install pyperclip
sudo apt-get install python3-pip
sudo pip3 install --upgrade pip
sudo pip3 install setuptools
sudo pip3 install pyperclip
This is what I had to do to get pyperclip to work on a Linux Mint box.
It sounds like you're trying to run a python script.
add the pyperclip package to python using:
$ pip install pyperclip
If you run the command again you should get this message. If not then address the error by installing the additional packages it asks for.
In the script you want to run, make sure you import the package to be able to access. In your file you should have:
import pyperclip
# What ever commands you want to run
pyperclip.copy('Hello, world!')
pyperclip.paste()
//These below three commands worked for MacBook Pro to install Pip & Pyperclip
1./Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip
2./Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/scripts
3.sudo pip3 install pyperclip
output:
Downloading pip-21.2.4-py3-none-any.whl (1.6 MB)
|████████████████████████████████| 1.6 MB 3.7 MB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.2.3
Uninstalling pip-21.2.3:
Successfully uninstalled pip-21.2.3
Successfully installed pip-21.2.4
Collecting pyperclip
Downloading pyperclip-1.8.2.tar.gz (20 kB)
Using legacy 'setup.py install' for pyperclip, since package 'wheel' is not installed.
Installing collected packages: pyperclip
Running setup.py install for pyperclip ... done
Successfully installed pyperclip-1.8.2

Categories

Resources