ImportError: Missing required dependencies ['numpy'] from Pandas Created Conda Environment - pandas

I created a new conda environment as follows
conda create -n NAME python=3.5
Added edit, of course activate the environment like so
activate NAME
Installed these libraries all at once
conda install numpy scipy pandas scikit-learn jupyter matplotlib
relevant libary versions that conda installed
when importing pandas ge
ImportError: Missing required dependencies ['numpy']
Can anyone replicate this installation of env on windows? I am thinking one of the files version are causing this and cannot find a solution, barring an externality.
Have uninstalled and installed pandas, numpy, etc all libraries, have also tried installing with pip even, nothing is working. Have even created another environment from scratch same error is occurring.

Conda should have installed a number of libraries when you build python 3.5 in the new environment. If you run "conda list" in the command line of the newly built environment it will show the packages you have by default. Try to build the environment with "conda create -n py35 python=3.5 anaconda" so it uses the anaconda python and will auto install packages.

Related

Jupyter Notebook import not working after recent update

I recently used the following command to update my jupyter packages conda update --all and from then on my visualization libraries wont import(matplotlib and seaborn). I used conda install <pkg> even then it wouldnt. So I reinstalled anaconda3 but same problem persists...
I tried to view sys.executable and found that it was not referencing my python lib in anaconda but in python click here
'c:\\python38\\python.exe' So i used pip3 install matplotlib and matplotlib worked. I want my jupyter to reference to its own lib stack as I cannot install all libraries in python. I want the jupyter to read packages from this path : C:\Users\princ\anaconda3\Lib\site-packages because all anaconda libraries are there. How do I do it? Help me please. The problem is jupyter is referencing python package folder and not pre installed packages in anaconda
SYS.PATH:
'c:\\python38\\python38.zip',
'c:\\python38\\DLLs',
'c:\\python38\\lib',
'c:\\python38',
'',
'C:\\Users\\princ\\AppData\\Roaming\\Python\\Python38\\site-packages',
'c:\\python38\\lib\\site-packages',
'c:\\python38\\lib\\site-packages\\win32',
'c:\\python38\\lib\\site-packages\\win32\\lib',
'c:\\python38\\lib\\site-packages\\Pythonwin',
'c:\\python38\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\princ\\.ipython']
jupyter kernelspec list
python3 c:\python38\share\jupyter\kernels\python3
Did you tried running pip using directly the python executable with
python.exe -m pip install <pkg>
I don't know if there is a similar way to do it with conda

`save_model` requires h5py error occurss after installing h5py and cython packages too

I need to save my new sequential model but when I use the model.save(filename),it shows error like save_model requires hp5y.I tried installing h5py in conda by 'conda install -c anaconda h5py'command. And I also installed cython,but then the error exists .what should I do?
one should include the package in pycharm project interpreter after being downloaded in the conda environment.

What's the minimal conda environment build for pandas?

I'm using Miniconda 3, and I'm trying to build a minimal Conda environment containing pandas. However, when I try to load the pandas module, Jupyter gives me the following error:
The kernel appears to have died. It will restart automatically.
When doing the same thing via Python in the Terminal, Python crashes.
I have created a minimal Conda environment, which can be reproduced via the code below.
conda create -n testenv
conda activate testenv
conda install python
conda install pandas
conda install jupyter
The problem doesn't occur anymore when I follow up with a full Anaconda install, via conda install anaconda.
Any ideas as to how this problem can be resolved without installing Anaconda?
I figured out what the problem was. What I should have mentioned is that I built a global channel list according to Bioconda recommendation, using
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
This makes conda-forge the highest-priority channel. For reasons I don't understand, conda-forge builds a dependency hell. (I noticed the guys at conda-forge: https://github.com/conda-forge/pandas-feedstock/issues/63).
For now, install using conda install -c defaults pandas.

How do you install a module in spyder anaconda?

I'm trying to run some code in Spyder Anaconda. I thought it would be as simple as importing it as seen in the code but I get an error message:
ModuleNotFoundError: No module named 'image_registration'
I know this means that image_registration isn't included in what Spyder already has but I cant quite figure out how to add it.
from image_registration import chi2_shift
from image_registration.fft_tools import shift
Add your Anaconda Scripts path (Default=C:\Users\userna**\Anaconda3\Scripts) to Environment Variables and open your command prompt and type
pip.exe install module_nameIn your case pip.exe install image_registration To install module image Registration
Please tryout the below steps in anaconda prompt
1. conda create -n myenv
2. activate myenv
3. pip install image_registration
4. conda install spyder
5. spyder
If you have already installed image_registration package in an environment you can activate that environment and try to open spyder from the activated environment.

Installing pandas without pip

Is it possible to install pandas without installing pip or Is there any other way to use pandas without installing pip.
Thanks in advance.
pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies
here is the another way:
Download and unzip the current pandapower distribution to your local hard drive.
Open a command prompt (e.g. Start–>cmd on Windows) and navigate to the folder that contains the setup.py file with the command cd
cd %path_to_pandapower%\pandapower-x.x.x\
Install pandapower by running
python setup.py install
You can get pandas installed using the Anaconda distribution, which includes the Anaconda prompt. After you open an anaconda prompt, you can run the following command:
conda install pandas
which will install the latest version of pandas, or:
conda install pandas=0.20.3
to get a specific version of the package. Another way to do it is to install it with Miniconda, which allows you to avoid downloading the Anaconda installer and hundreds of other packages. More information can be found here: https://pandas.pydata.org/pandas-docs/version/0.23.4/install.html