This question already has answers here:
pip how to remove incorrectly installed package with a leading dash: "-pkgname"
(4 answers)
Closed 2 years ago.
I have tried to do the standard
pip freeze > requirements.txt and got
Could not parse requirement: -pencv-python
I then found out pip actually thinks this is the installed package
Notice the 1st line.
How do I get rid of this and get a requirements file?
For some reason, venv\Lib\site-packages had a folder ~pencv_python-4.2.0.34.dist-info, which was unused, due to opencv_contrib_python-4.2.0.34.dist-info also being present.
I removed it and it worked.
Windows, if anyone cares.
Related
This question already has answers here:
Why does "pip install" inside Python raise a SyntaxError?
(7 answers)
Closed last month.
When I try to install packages, e.g. pypdf2, I get a syntax error:
I tried to change the environment variables like is done in other questions on this topic but I do not succeed in solving this problem. Can someone provide a step-by-step walkthrough in solving this problem for a Python beginner?
You are trying to execute pip install as if it is a python command: but it isn't.
You need to execute all pip commands from the normal O/S command line - since you are in Pycharm you can simply type those pip commands from the Terminal window (the one you used to try to run the script).
This question already has answers here:
pip how to remove incorrectly installed package with a leading dash: "-pkgname"
(4 answers)
Closed 1 year ago.
As in WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages) How do I fix this and what does it mean? which is not a duplicate.
The warning message 'WARNING: Ignoring invalid distribution -ip...' is the sign that this is happening.
This is referenced in https://github.com/pypa/pip/issues/9417
The answer is to manually remove the directories ~ip and ~ip-m.m.p.dist-info (where m.m.p is the version number that was upgraded) from the site-packages directory.
This question already has answers here:
(using 'imgkit' on Ubuntu server) wkhtmltopdf: could not connect to any X display
(2 answers)
Closed 2 years ago.
I have installed a Python library called eml2png. This library has a dependency on "wkhtmltopdf" which I have also installed. When I try making a call, I get the following error:
You need to install xvfb(sudo apt-get install xvfb, yum install xorg-x11-server-Xvfb, etc), then add option: {"xvfb": ""}.
I have installed this library, but I have no idea where I add the option {"xvfb": ""}. Can someone please explain this?
Thanks
After a quick look at the source (https://github.com/poipoii/eml2png/blob/master/src/eml2png/eml2png.py) I suggest trying:
eml2png.to_png('message.eml', options={"xvfb": "", "format": "png"})
This question already has answers here:
VS Code error when importing Django module
(11 answers)
Closed 2 years ago.
I'm getting this error
even tho I have installed pylint in the environment it still showing this error
The issue is with django and firstpage, not pylint. Install them in the same way you installed pylint.
This question already has answers here:
How do I install Python packages on Windows?
(12 answers)
Closed 5 years ago.
I wanted to download pyperclip module. I have folder with some files like "docs" and so. There is also setup.py. I double click, black window opens and closes. I have red many pages in the Internet where have been described how to set up mudules, but i can't do that. For example, look at screenshot. enter image description here. It says "command is not inside or ouside".
Can anyone give me ditailed instraction of instaling modules?
First you need to add python to path (like in this answer
Then you need to install pip and setuptools to correctly install packages
And after try install your package