pip install psd-tools3 => FileNotFoundError: [Errno 2] No such file or directory - pip

I was trying to install Ursina but I was having trouble getting all the required packages I needed to run my code properly. Come to find out, there's a package that refuses to install called 'psd-tools3' that won't install, no matter what I do.
I've been using cmd commands like 'pip install psd-tools3' and 'pip3 install psd-tools3' but no other commands work (i.e. 'sudo pip install psd-tools3' doesn't work because my PC doesn't know what 'sudo' means and doesn't run). I've tried installing required packages for this package, but nothing works. It just keeps giving me this error:
enter image description here
I would really appreciate the help with this problem. All I can really assume is that the Python file '_version' hasn't been created and that's what's throwing the whole program off. If there is a way to add this manually and then install it, I would appreciate steps to do that as well.
I was running this on a Lenovo Thinkpad (Windows 10) on Python 3.10 (I also have Python 3.8.3 but that was installed with the 3.10) and I made sure all packages and pip are up-to-date. Still having this problem and I don't know why.

Seems to me like the issue is on the side of the maintainers of psd-tools3.
For example, looking at the content of the latest source distribution on PyPI, we can see that it does not contain any _version.py file.
This needs to be solved by the project's maintainers, but they do not have a ticket tracker. On the other hand there seems to be an "Author" email address on the project's PyPI page as well as in the project's setup.py script.
A solution might be to clone the project's source code repository (with git), and try to install from the local clone.

Just simply try
pip install psd-tools3==1.9.0
Or
pip install psd-tools3==1.8.2
This should work on your pc as well. I was having same issue, and then I tried this It worked for me

Related

I cannot find pip in Python 3.9.7, find an install that actually works, and it refuses to recognize the pathway I set up for pip

I followed several tutorials on how to fix it, made sure pip was check marked when modify installation, tried creating an environment pathway (which I already have one for python) for it but then I realized Scripts were now where to be found. I also tried python -m pip install openpyxl from another 3.9.7 post with the same problem, didn't work. I did some further digging and found it in my lib folder under site-packages. It refuses to recognize it no matter what I do. I Tried creating a pathway for that but it still doesn't work. What can I do to fix this?
I tired creating new pathways and to manual install pip

How to Fix Entry Point Not Found while installing libraries in conda environment

I'm working on Anaconda by making multiple environments in it. I have made an environment camelot and now I want to install different libraries in this environment. So for example to install pandas in this environment,
I'm writing:
conda install pandas
or
conda install -c conda-forge camelot-py
Then it gives me this error:
python.exe-Entry Point Not Found
The procedure entry point OPENSSL_sk_new_reserve could not be
located in the dynamic link library.
C:\Users\abc\Anaconda3\Library\bin\libssl11_-x64.dll
First I thought it may be because of the environment variable, thus I set an environment variable for Python, but this did not resolve the issue.
as it is suggested in here I could solve this problem by copying libssl-1_1-x64 dlls in Anaconda/DLLS to Anaconda/Library/bin (probably replacing it)
I got the same issue while updating Anaconda navigator, and got it over by replacing the file libssl-1_1-x64.dll in Anaconda3/Library/bin with the one from Anaconda3/DLLs.
As mentioned by an Anaconda maintainer here ...
moving libssl dlls around like that is really not advisable. Those
DLLs are duplicated because you have something fishy going on in your
packages. There should not be any openssl DLLs in the DLLs folder.
They should be in Library/bin
By looking at the JSON files in the conda-meta directory I found out that DLLs\libssl-1_1-x64.dll was installed by the python 3.7.0 package, and Library\bin\libssl-1_1-x64.dll was installed by the openssl package. After further investigation I found out that Python 3.7.0 does not install OpenSSL as a separate package, but Python 3.7.1 (and later) does.
Typically upgrading Python goes as expected, but if you somehow end up with both python 3.7.0 and openssl packages installed simultaneously there will be two libssl-1_1-x64.dll files and your Anaconda distribution will be broken. (You can easily verify this with the conda list command.)
I think the best way to fix it is therefore:
Rename Library\bin\libssl-1_1-x64.dll to Library\bin\libssl-1_1-x64.dll.org (your are going to need it later.)
Copy DLLs\libssl-1_1-x64.dll to Library\bin\libssl-1_1-x64.dll
Update Python to version 3.7.1 or higher, for instance with conda update python. This will remove the DLLs\libssl-1_1-x64.dll file.
Delete the current Library\bin\libssl-1_1-x64.dll file.
Rename Library\bin\libssl-1_1-x64.dll.org back to Library\bin\libssl-1_1-x64.dll. This is necessary because I got HTTP errors in the next step otherwise.
Reinstall OpenSSL with conda install openssl --force-reinstall to ensure it's up to date again.
I had the exact same issue, and it also just started today. Kind of destroyed my entire work day, tbh...
I accidentally did a conda install ... in my base environment, and it updated conda and a handful of other modules. (Conda went from 4.5.12 to 4.7.10, in my case.) Anyway, after I rolled it back, things are working as expected again.
If this is what's causing your issue, here's a fix.
conda list --revisions
conda install --revision 1 (In my case "rev 1" was my most recent, stable base environment.)
(More details about this: https://sriramjaju.github.io/2018-05-30-2-minute-recipe-how-to-rollback-your-conda-environment/)
Now I'm worried that I've inadvertently configured something in a way that isn't compatible with the newest version of conda.
Edit: Don't follow this last suggestion if you're doing anything other than playing around in a conda environment to test-drive modules. See this and this.
Lastly, if you really need to install modules and do some work ASAP, pip install [module name] was still working for me before I thought to do the reversion thing.
My problem was same. I just uninstalled anaconda, and install it again. And the problem solved.
I was receiving the same following error while updating spyder and conda package.
python.exe-Entry Point Not Found
The procedure entry point OPENSSL_sk_new_reserve could not be
located in the dynamic link library.
C:\Users\abc\Anaconda3\Library\bin\libssl11_-x64.dll
solution:
I did replace libssl-1_1-x64 dlls from Anaconda/DLLs to
Anaconda/Library/bins as suggested here.
Before opening Anaconda Navigator desktop app, I updated conda in Anaconda Prompt using conda update conda. conda successfully updated.
Then I have updated spyder using conda update spyder command in
Anaconda Prompt. spyder updated and running successfully.
For those still having similar issues with libssl11_-x64.dll or other .dll files:
Use pip install instead if you can!
I had the same issue today with libcrypto-1_1-x64.dll when trying to install plotly using
conda install -c plotly plotly
This prompts a downgrade for anaconda, and in turn raises the error:
OPENSSL_sk_new_reserve [...] libcrypto-1_1-x64.dll
Instead, using for example
pip install plotly==4.1.0
works like a charm!

How to uninstall partially installed module with Pip

I recently decided to try to install tesseract onto my computer and ran pip3 install tesseract-ocr.
It then started to download cython which alerted me to the fact that tesseract-ocr was not what I wanted, so I hit CTRL-C to cancel the command.
However, it appears that there is still a Cython folder inside my directories; pip did not clean up after the cancel. Also, I can't use pip uninstall cython because it just tells me it hasn't been installed yet.
What can I do to get a clean removal of Cython?
FWIW, the package name you gave doesn't appear to be on the global pypi index, so perhaps you left some steps out?
pip3 install opencv-tesseract
Collecting opencv-tesseract
Could not find a version that satisfies the requirement opencv-tesseract
(from versions: )
No matching distribution found for opencv-tesseract
In this type of situation, I think the answer becomes:
In the future, let it finish installing, then uninstall it once complete, so that it can clean itself up properly.
Don't panic if pip is installing dependencies of the thing you're installing. When I pip3 install tesseract-ocr as in the edited question, I see:
Collecting tesseract-ocr
Downloading tesseract-ocr-0.0.1.tar.gz
Collecting cython (from tesseract-ocr)
...
Which is totally normal and just indicates you are installing a dependency of your dependency, in this case cython, so no need to cancel it.
Install dependencies to disposable virtualenvs so that you don't pollute your global packages and file system: https://virtualenv.pypa.io/en/stable/
You will probably just have to delete the leftover cython directories.
While you can delete the files manually (usually residing in the folder site-packages, it is better to completely reinstall the package, and then use pip uninstall <package> in order to completely uninstall it.
I also had this problem when I lost power to my Pi part way through installing linux-remote.
I deleted the .whl file to resolve the problem, which was located here in my case:
/root/.cache/pip/wheels/a0/75/....../linux-remote-3.4-cp37-none-any.whl

Can't get pip working with psychopy install

I am very new to python and plan to use psychopy quite a lot. I am on a work computer but have full admin rights.
Psychopy came with python version 2.7.11 and includes setuptools already.
I am trying to install the selenium module, but having trouble getting pip to work at all.
In cmd, it is recognising the 'python' command, so I know python is in my path.
I get the message "can't open file 'pip': [Errno2] No such file or directory" from:
python pip install selenium
I get " 'pip' is not recognised as an internal or external command" from:
pip install selenium
When I change directory to where pip is located, I get:
Fatal error in launcher: Unable to create process using '"'
Using pip2 makes no difference.
It seems a simple thing but where am I going wrong with this?!
I never really got to the bottom of this, but this is what I found out and here are the commands that worked for me in Windows. Be aware that I am far from expert!
To run python scripts (*.py) from command line (cmd) then C:\PsychoPy2 and C:\PsychoPy2\DLLs need to be in path. ('Path' contains directories or file extensions that can be more globally accessed, i.e. do not require you to change the prompt to the relevant directories first).
To check, open cmd and either type echo %PATH% or just type python. (If python starts, the line will say >>>. You can exit by typing quit())
To add to path, get properties of computer, then advanced system settings, then environment variables.
To check pip.exe (a sort of installation wizard) is installed, either search for the file, or check C:\PsychoPy2\Scripts for it. This may also need to be in path.
To reinstall the latest versions of pip and setup tools, I went to cmd and typed:
python -m pip install -U pip setuptools
If the same code did not work for other modules (which in my case was due to network access), then I downloaded the wheel file (*.whl) for that module (from their website) and ran the following code:
python -m pip install c:/modulename.whl
These may not be the correct ways of doing things, but they worked for me when I couldn't get other ways to work!
I've just had the exact same issue with the pip install, and a conflict with PsychoPy installations. I think it's because python automatically wants to call on the path that's been set by Psychopy, so it can't get to the 'pip' folders that for me, remain in a temporary/hidden file. This wasn't intuitive for me - on any machine without psychopy python just 'works' when you download it.

pip is not uninstalling packages

Background
I'm working on an academic project to (basically) analyze some "who follows whom" graphs and wanted to get some real data (by building some small datasets) from Twitter using one of the Python Twitter API packages in order to test some ideas I have.
I was a bit careless and installed two packages:
a) python-twitter0.8.2 (http://pypi.python.org/pypi/python-twitter/0.8.2)
b) twitter1.9.1 (http://pypi.python.org/pypi/twitter/1.9.1)
(a) is called python-twitter in pypi, and (b) is called twitter, so that's how I'll refer to them.
Both of these are called by import twitter in the Python interpreter, but when I write that line, I always get the twitter one (if I can figure out how to use the python-twitter one, I'll be able to proceed, but will still have the same underlying problem).
Problem
Since I don't need the twitter package, I decided to uninstall it with pip:
$ sudo pip uninstall twitter
which gives the output:
Uninstalling twitter:
Proceed (y/n)? y
Successfully uninstalled twitter
(actually, I tried the same thing with python-twitter and got a similar response).
However, when running pip freeze, both of these packages show up on the installed list! In fact, I can still use the import twitter command successfully in the interpreter. Clearly the packages have not been uninstalled. What I would love to know is how to uninstall them!
Other Info
I'm using Python 2.7 and Ubuntu 12.04
When running IDLE instead of the shell interpreter, and I type help('modules'), neither twitter nor python-twitter shows up in the list. When typing help('modules') into the shell interpreter, I get a segmentation fault error, and the interpreter crashes. Here's the error:
>>> help('modules')
Please wait a moment while I gather a list of all available modules...
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning:
g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning:
g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
from gtk import _gtk
** (python:2484): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register
existing type `GdkDevice'
from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata:
assertion `node != NULL' failed
from gtk import _gtk
Segmentation fault (core dumped)
Why other questions have not resolved this for me:
I looked at the similar post at pip freeze lists uninstalled packages and am not having the same issues.
$ sudo which pip
/usr/bin/pip
$ which pip
/usr/bin/pip
which is the same output. In addition, $ sudo pip freeze gives the same output as $ pip freeze.
Any help is very much appreciated!
You can always manually delete the packages; you can run:
sudo rm -rf /usr/local/lib/python2.7/dist-packages/twitter
to remove that package from your dist-packages directory. You may have to edit the easy-install.pth file in the same directory and remove the twitter entry from it.
While Martin's solution works, as a work around, it does not provide a direct answer.
Ubuntu's pip version for your Ubuntu version (12.04) is:
python-pip (1.0-1build1)
This is also the same version for Debian Wheezy. This version has a weired bug, which causes packages not to be removed.
If you obtain pip from upstream using the script get-pip.py you will have a fixed version of pip which can remove pacakges (as of now v. 1.5.6).
update
Python's pip is really a fast moving target. So using Debian's or Ubuntu's pip is guaranteed to have bugs. Please don't use those distribution's pip.
Instead install pip from upstream.
If you would like to register pip installed packages as system packages I really recommend that you also use stdeb.
I was facing difficulty while upgrading a package because pip was not able to uninstall it successfully. I had to delete the .egg-info and the folder as well in /usr/lib/python2.7/dist-packages and then I tried to install with --upgrade and it worked.
For me, it was due to the fact that I was running pip freeze, which gave me different results than sudo pip freeze.
Since I was uninstalling using sudo, it was not uninstalling it in the "non-sudo" session. Uninstalling without sudo fixed that.
In my case (moving pyusb 0.4x to 1.0x), removing the old package with apt-get remove python-usb and manually installing the manually downloaded package via python setup.py worked. Not pretty, but working.

Resources