Conda's install program tells me that Pypdf2 is already installed, but I cannot import it in JupyterLab - installation

As I couldn't import it onto JupyterLab, I tried to re-install pypdf2 using
conda install -c "conda-forge/label/broken" pypdf2
suggested by the userguide, and I got the message
Solving environment:done. All requested packages already installed
pypdf2 is also in the conda list, but is still in the "not imported" list of the Anaconda Navigator. ...And I still get the msg "no module named pypdf2" in JupyterLab!
I'm using Windows 10.
Any hint? Thanks in advance.
I tried to re-install pypdf2 using conda install (as well as the install program of the anaconda navigator) and I got the msg that it was already installed. I cannot import it onto JupyterLab, though.
And the "installed/not installed" list of Anaconda Navigator still indicates the pypdf2 is not installed ...
A virtualenv is not a solution in the present context:

Solved.
I decided to uninstall everything related to Python, Anaconda and any of their family members, and to reinstall Anaconda from the web - and it worked. I can now import PyPDF2.
So the problem was probably related to conflicting (and possibly old) versions of God knows what.

Related

Is there new version of pygame for anaconda env?

I have pygame in pip environment and used it without problem.
But now I switched to conda environment (called tf-gpu) to have TF features also.
As I figured out the most used channel for conda version of pygame is cogsci.
But conda install -c cogsci pygame in terminal causes an error:
It seems there is a version incompatibility.
I then downloaded the original tar.bz2 file from conda, and tried conda install --offline C:\...(file path)
It downloaded and recognized by interpreter(python 3.8.8, conda('tf_gp' env)).
Then Pyhton imported pygame but error of there is no module "from python.base import *" proceeded it.(as it is in the __init__ file of package)
Are these problem due to old version of pygame? I tried other channels in anaconda but unsuccessful(also they were older).
And also i can not downgrade python because of many packages' prerequisites.
I also tried installing via pip(in that conda promp), but it said that the requirment has been satisfied(as i previoisly used pygame in pip env(python 3.8.2).
Is there any new conda version of pygame?
Should i remove previous pygame in pip and try pip install again in conda env?
Or is it possible to modify main package source code(old file)?
This issue usually comes in when you are running many versions of python and pygame together which causes some incompatibility. Another problem which may occur is that anaconda environment stop recognising the pygame as it can’t locate it.
My suggestion is that uninstall all the older versions of python and pygame and install the latest ones.
Or else you may shift to Visual studio code for better experience and lesser problems.
Thanks,
The problem was solved by uninstalling other python version that I had(3.6). and using pip version of pygame(which did not work when two python versions (3.6, 3.8) were on my system.)

Installing PyArrow for the purpose of pandas-gbq

I have tirelessly tried to get pandas-gbq to download via the pip installer (pip 20.3.3; python 3.9.1). Whenever I pip install pandas-gbq, it errors out when it attempts to import/install pyarrow.
I further tested this theory that it was having trouble with PyArrow by testing "pip install pyarrow" itself. This had the same error. I can post parts of the error if requested, but it's thousands of lines long and I can't even identify what the error is. I have 64 bit python, 64 bit pycharm, 64 bit machine etc etc.
Has anyone had trouble with this before. My solution was downloading Anaconda and I was able to conda install pyarrow, but I really don't understand what the problem with it all is. To further complicate the issue, I am able to leverage pandas-gbq by running my python project located in a venv created by PyCharm in cmd.exe, however I cannot run it in the PyCharm console.
When I have tried reconfiguring my python interpreter in PyCharm, it just says it cannot find the path to the project. Lotssss of confusion, would appreciate any help!
I encountered the same problem myself,
what worked for me is reinstalling it with pip and restarting the Jupyter notebook
you might also try reinstalling it with conda
conda install -c conda-forge pyarrow
as per this answer below, for a similar question, which seems to cover the case
Error importing pyarrow in jupyter notebook after pip installation of pyarrow

Removing package in Anaconda

I have installed a package using anaconda and pip and then removed the package using pip. When i uninstalled using pip in cmd it says uninstalled. So now i have too remove this package from anaconda.
As you can see from the picture above yfinance shows it is installed. However when i try to run the command: conda remove yfinance it says package not found:
How can i remove this package? Because i need to install a fork of this package.
--Edit:--
I tried to install this package but i am getting an error:
Thus i cannot uninstall it.
You can try to install the package anaconda, and then to try uninstall again.
conda install yfinance
conda remove yfinance
I hope this helps.
EDIT
You can also delete the directory of the package, as you pointed out. But make sure you are in the correct one! This seems to be in your root directory of anaconda, as you use the base environment. In my case, this would be
/home/user/anaconda3
You may want to use a search tool to find the correct folder. This might be
/home/user/anaconda3/lib/python3.7/site-packages/yfinance

Installing networkx v2.4 for python3.7 via anaconda on Windows 10

I installed Anaconda3 (version 2019.10-Windowsx86_64) on my PC last week. It comes with networkx v2.3, but I would like to upgrade to v2.4, which should be available on Anaconda according to conda search and Anaconda's website.
I first tried the Anaconda navigator, but can't get it to work. It indicates that networkx can be updated. However, when I click Apply the navigator spends a bit of time "solving package specifications" and then gives me the empty pop-up shown below.
I also tried using conda prompt. Using conda install networkx, conda update networkx, conda install -c anaconda networkx does not result in v2.4 being installed. I also tried conda install networkx=2.4, which takes forever and then reports a very long list of package conflicts. I find this confusing because I just installed Anaconda and haven't tampered with any configs yet.
Grateful for any help on understanding what is going on and how I can attempt to fix it!
I also tried conda install networkx=2.4, which takes forever and then reports a very long list of package conflicts.
This is the key here. anaconda comes with many packages pre-installed and some of these might depend on networkx==2.3 since they might not be compatible with the newest version.
What you can do is create a new environment that has the required version of networkx:
conda create -n myenv python=<your desired python version> networkx==2.4
which will create a new environment where you can only install the packages that you need and make sure that networkx==0.24 is satisfied.
You can try this in jupyter notebook in case you are working on jupyter notebook.
!pip install networkx==2.4
I had 2.5 v installed. But something wasn't working and had to degrade it to 2.4 and above method worked.
Try this:
pip install --upgrade networkx

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!

Resources