Cannot pip install sklearn for Python 3.6 - python

First, I downloaded the numpy+nlk whl file here and did
python3 -m pip install numpy‑1.11.3+mkl‑cp36‑none-any.whl
I renamed thanks to this tip: filename.whl is not supported wheel on this platform
But when I do
python3 -m pip install sklearn
I get Original error was: cannot import name 'multiarray'
I've tried unistalling and reinstalling numpy, but I have no idea how to fix this.

I just uploaded the windows wheels for scikit-learn 0.18.2 and Python 3.6 to PyPi: https://pypi.python.org/pypi/scikit-learn/0.18.2 Can you try again and give the full traceback if that still does not work?

If you have installed pip then follow the given steps:
upgrade pip to the latest version
install
pip install numpy scipy scikit-learn
pip install sklearn

Related

pip install ppaquette-gym-doom

I wrote pip install ppaquette-gym-doom
and it gives me a
error: legacy:install-failure
I tried pip install gensim pip install dlib --pre python -m pip install --upgrade pillow
python -m pip install --upgrade pip and python -m pip isntall --upgrade wheel
those codes didnt solved my problem
I am not familiar with gym-doom but based on some quick research it looks like you are getting this error because "ppaquette-gym-doom" is an obsolete version. From the github page "Note: This environment is not maintained anymore, and uses an old version of VizDoom."
It seems like the new version is simply "pip install gym-doom". This will also require something called Vizdoom.
Again this is based on quick research. I have never used these libraries.

How can I solve this Tensorflow using and installing Error?

I had used tensorflow before this time.Now,tensorflow is installed but it cannot be imported.Moreover,it cannot be installed again.What happened in tensorflow?I searched many solutions for this error but I cannot find.When tensorflow is installed with pip,this error appears.
Unable to create process using 'C:\Users\hp\Anaconda3\envs\tf-gpu\python.exe C:\Users\hp\Anaconda3\envs\tf-gpu\Scripts\pip-script.py install tensorfow'
And when it is installed with anaconda,it can be installed,but cannot be imported,"ModuleNotFoundError: No module named 'tensorflow'".How can I solve this trouble to reuse tensorflow without reinstalling anaconda ,please help me.Thanks a lot in advance!!
You can uninstall and reinstall the pip:
python -m pip uninstall pip
python -m pip install --upgrade pip
or update pip:
python -m pip install -upgrade pip

Cannot import pymc3 module due to geweke

I've tried installing it on a separate env and installing arviz separately. The import pymc3 as pm will not work.
AttributeError: module 'arviz' has no attribute 'geweke'
It looks like the issue is related to the version of python (3.6) you are using and a dependant library pyMC use called arviz.
Make sure you uninstall the old version and follow the following steps to reinstall everything.
Uninstall using :
pip uninstall Theano Theano-PyMC PyMC3
Make sure you remove theano left overs by running :
sudo rm -fr the_python_path_u_are_using/lib/python3.6/site-packages/theano
And then install arviz with :
pip install arviz==0.10.0
And finally, install pymc3 again.
pip install pymc3
Try again and it will work.
It depends on your environment
For Anaconda:
Uninstall “arviz”
Use:
conda uninstall arviz
Now, install the latest version of “arviz”
For today, it is version 0.11.1
Use:
conda install arviz==0.11.1
For Non Anaconda environments:
Uninstall “arviz”
Use:
pip uninstall arviz
Now, install the latest version of “arviz”
Use:
pip install arviz==0.11.1
My environment: Ubuntu 18.04, Python 3.7.10
I have similar problem, after read this error at https://discourse.pymc.io/t/attributeerror-module-arviz-has-no-attribute-geweke/6818/4. The following commands solve the problem of AttributeError: module 'arviz' has no attribute 'geweke'
pip uninstall arviz
pip install arviz==0.11.0
pip install pymc3==3.10.0

Installed Anaconda 4.3.1 (64-bit) which contains Python 3.6 but pip3 missing, cannot install tensorflow

I downloaded the latest stable Anaconda install off the Continuum website which turned out to be Anaconda 4.3.1 (64-bit) and comes with Python 3.6.0. I am in a Windows 10 environment.
However pip3 is missing and I cannot install any Python 3.x packages via pip3.
What am I doing wrong?
If you do not have another environment installed python 3+ will default to just pip I believe since pip3 is just an alias for pip.
pip install --upgrade pip
or You can do it with the associated Python binary too; if it executable as python3, then use that:
python3 -m pip install --upgrade pip
after that check:
pip --version
otherwise just try pip-3.6
for tensorflow on conda:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl
for python 3.6 due to conda providing the 3.5 one: from
pip install https://testpypi.python.org/packages/db/d2/876b5eedda1f81d5b5734277a155fa0894d394a7f55efa9946a818ad1190/tensorflow-0.12.1-cp36-cp36m-win_amd64.whl
Since this wheel had a version that is undesirable we could instead install
the wheel directly from gohlke's windows binaries repository :
download the wheel for python 3.6 from here and then install the wheel:
cd to the directory containing .whl file:
pip install some-package.whl
easy_install pip
I used it, for the problem of pip installation in miniconda.
sometimes the pip is not properly installed but it claims yes
Solution:- (Note:- This will surely work for all!!)
Step 1:- conda search python
Step 2:- conda install python=3.5.2
Step 3:- pip install tensorflow
Step 4:- import tensorflow as tf
I have Windows10, 64bit, Anaconda4.3 with Python 3.6.
Karthik' soluton worked for me. Before that I tried everything including "conda create -n tensorflow python=3.5", but it did not work (although "python --version" gave 3.5.3).
you should be able to install tensorflow using
$ conda install -c conda-forge tensorflow

Importing caffe results in ImportError: "No module named google.protobuf.internal" (import enum_type_wrapper)

I installed Anaconda Python on my machine. When I start the Python Interpreter and type "import caffe" in the Python shell, I get the following error:
ImportError: No module named google.protobuf.internal
I have the following files:
wire_format_lite_inl.h
wire_format_lite.h
wire_format.h
unknown_field_set.h
text_format.h
service.h
repeated_field.h
reflection_ops.h
message_lite.h
message.h
generated_message_util.h
extension_set.h
descriptor.proto
descriptor.h
generated_message_reflection.h
generated_enum_reflection.h
dynamic_message.h
descriptor.pb.h
descriptor_database.h
What files do I need so the import will work? Is there an "internal.h" file that is required?
This is probably because you have two python environments in your machine, the one provided by your linux distribution(pip) and the other by the anaconda environment (/home/username/anaconda2/bin/pip).
Try installing protobuf for both environments to be sure
pip install protobuf
/home/username/anaconda2/bin/pip install protobuf
If you are using Anaconda, do conda install protobuf
If you are using Ubuntu, try installing protobuf using
sudo apt-get install protobuf
It solved the same problem that I faced.
Easiest way to fix it:
pip install grpcio
pip install protobuf
When have multiple python version use: as suggested by aimuch.
/usr/local/bin/pip2 install protobuf
/usr/local/bin/pip2 install grpcio
This is because the python envirnment confusion.
# check where pip2
$ where pip2
/usr/local/bin/pip2
/usr/bin/pip2
# check where pip
$ which pip
/usr/local/bin/pip
On my computer, I have two pip2(I install caffe using python2 env), so I used /usr/local/bin/pip2 install protobuf solved this problem.
/usr/local/bin/pip2 install protobuf

Categories