I am trying out googleDataStore with the tutorial using pip 1.5.4
https://developers.google.com/datastore/docs/getstarted/start_python/
I am running on a Mac and getting stuck on the installation of the datastore
virtualenv gcd
gcd/bin/pip install googledatastore
I get an error
Downloading/unpacking googledatastore
Could not find a version that satisfies the requirement googledatastore (from versions: v1beta1-rev1-1.0.0, v1beta1-rev2-1.0.1, v1beta2-rev1-2.0.0, v1beta2-rev1-2.1.0)
Cleaning up...
No distributions matching the version for googledatastore
Storing debug log for failure in /Users/ryan/.pip/pip.log
In the log ~/.pip/pip.log there is quite a bit and it ends off with
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/index.py", line 322, in find_requirement
raise DistributionNotFound('No distributions matching the version for %s' % req)
DistributionNotFound: No distributions matching the version for googledatastore
Solution is: pip install --pre googledatastore
I will leave the question up because I did not find this in my google search here is my source. It is not quite a duplicate but close
Source for solution: Could not find a version that satisfies the requirement pytz
Might be off topic, but you may be interested in gcloud-python (documentation).
Related
Suddenly pip cant install or find any package, it cant even figure out its own version.
I reinstalled python multiple times, i have the latest version of python 3 and pip. I also tried to clear pip cache. Nothing works, this is really annoying...
Errors:
>pip install redblacktree
ERROR: Could not find a version that satisfies the requirement redblacktree (from versions: none)
ERROR: No matching distribution found for redblacktree
WARNING: There was an error checking the latest version of pip
>pip config list
freeze.user='yes'
global.index-url='http://pypi.org/simple'
global.trusted-host='pypi.org'
install.user='yes'
list.user='yes'
uninstall.user='yes'
I fixed it by locating the pip.ini config file and removing the line index-url = http://pypi.org/simple
Recently I have been installed Python 3.8.2 ( Feb 24, 2020) (64bit, Windows). Afterward, I've been updated Pip 20.0.2. And then trying to install Unittest" pip install unittest" but unfortunately it's appearing this message.
Does anyone has been faced this same problem?
C:\Users\BiploB>pip install unittest --user
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
ERROR: Could not find a version that satisfies the requirement unittest (from versions: none)
ERROR: No matching distribution found for unittest
enter link description here
If I am not mistaken unittest is part of Python's standard library. Meaning, it's available per default, meaning there is no need (and also no way) to install separately.
I have windows 10. I am using python 3.5 and the following dependencies:
tensorflow==1.2.0
numpy==1.14.2
pandas==0.22.0
h5py==2.7.1
I download the code from this link: here
I am running it but I faced the following problem: ImportError: save_model requires h5py.
I google it I found that I need to install these dependencies:
List libhdf5
List h5py
h5py was installed, but libhdf5 can't:
Could not find a version that satisfies the requirement libhdf5 (from versions: )
No matching distribution found for libhdf5
Any help?
I have search all over and I now Im on the verge of just giving up.
The cpu version of tensorflow installs just fine but I want to use the gpu. I have before used theano with gpu with CUDA8 and cuDNN 5.1 so they should be ok.
I have also tried to install the nightly build of tensorflow with the same result.
Any suggestions on what to check next. I'm this close to throw it all away, install virtualbox and ubuntu and run everything from there (don't want to though because of prestigious reasons :) ).
(C:\Users\Jens\Anaconda3) C:\Users\Jens\Documents>pip install tensorflow-gpu
Collecting tensorflow-gpu
Using cached tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl
Requirement already satisfied: protobuf>=3.1.0 in c:\users\jens\anaconda3\lib\site-packages (from tensorflow-gpu)
Requirement already satisfied: six>=1.10.0 in c:\users\jens\anaconda3\lib\site-packages (from tensorflow-gpu)
Requirement already satisfied: numpy>=1.11.0 in c:\users\jens\anaconda3\lib\site-packages (from tensorflow-gpu)
Requirement already satisfied: wheel>=0.26 in c:\users\jens\anaconda3\lib\site-packages (from tensorflow-gpu)
Exception:
Traceback (most recent call last):
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
check_dist_requires_python(dist)
File "C:\Users\Jens\Anaconda3\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
feed_parser.feed(metadata)
File "C:\Users\Jens\Anaconda3\lib\email\feedparser.py", line 177, in feed
self._input.push(data)
File "C:\Users\Jens\Anaconda3\lib\email\feedparser.py", line 101, in push
parts = data.splitlines(True)
AttributeError: 'NoneType' object has no attribute 'splitlines'*
It seems a problem with Anaconda itself and not with TensorFlow, could you please try:
Uninstall TensorFlow
Install TensorFlow with conda install
Also see this issue on Github.
I'd suggest as well, but with a caveat because I didn't test this one, to download a nightly build and install it instead of the PYPI package.
edit: now that I saw #mrry already had pointed you the direction to take so that might work.
You where both on the right track. I did a clean install of Anaconda3 and created two new environments. One for theano and one for tensorflow.
With the clean install I could use
pip install tensorflow-gpu
Now both theano and tensorflow works with GPU.
Thanks
I need to make use of python's mitmproxy. I have installed it successfully. However when I run mitmproxy command on my terminal it gives me a stack trace like the below :
File "/usr/local/bin/mitmproxy", line 9, in load_entry_point('mitmproxy==0.13', 'console_scripts','mitmproxy'()
File "/Library/Python/2.7/site-packages/pkg_resources/init.py", line 558, in load_entry_pointreturn get_distribution(dist).load_entry_point(group, name)
File "/Library/Python/2.7/site-packages/pkg_resources/init.py", line 2682, in load_entry_point return ep.load()
File "/Library/Python/2.7/site-packages/pkg_resources/init.py", line 2355, in load return self.resolve()
File "/Library/Python/2.7/site-packages/pkg_resources/init.py", line 2361, in resolve module = import(self.module_name, fromlist=['name'], level=0)
File "/Library/Python/2.7/site-packages/libmproxy/main.py", line 7, in from . import version, cmdline
File "/Library/Python/2.7/site-packages/libmproxy/cmdline.py", line 5, in from netlib import http
File "/Library/Python/2.7/site-packages/netlib/http.py", line 7, in from . import odict, utils, tcp, http_status
File "/Library/Python/2.7/site-packages/netlib/tcp.py", line 26, in 'TLSv1.2': SSL.TLSv1_2_METHOD, AttributeError: 'module' object has no attribute 'TLSv1_2_METHOD'
I tried debugging the issue through some Googling and looks like I needed to upgrade my pyOpenSSL.
To know the current version of my PyOpen SSL I did the following on the Python prompt and got the ouptut as shown below to be 0.13:
>>> import OpenSSL
>>> print OpenSSL.__version__
0.13
So I tried upgrading the my pyOpenSSL using the below :
sudo pip install --upgrade pyOpenSSL
ans successfully did so, as when I ran the above again I received the following in the first line of the output :
Requirement already up-to-date: pyOpenSSL in /Library/Python/2.7/site-packages
Just to cross verify I went to the above path and found the PyOpenSSL dir as PyOpenSSL-0.15.1.dist-info. So am guessing PyOpenSSL was actually upgraded to the latest version.
However, when I ran the below on Python prompt again I received the version again as 0.13. Ideally I was expecting it to give the updated version now.
>>> import OpenSSL
>>> print OpenSSL.__version__
0.13
Some blogs suggested that if I have a virtualevn installed, it might interfere with the above. So I uninstalled virtualenv as well using
sudo pip uninstall virtualenv
I am still not able to get mitmproxy running. And when I run mitmproxy, I still get the same error as above.
Please let me know what am I missing and how to get mitmproxy running.
So it happens yet again. :P I could figure out the problem with the above approach and the solution to it as well on my own - OF COURSE - with the help of some friends and blogs !
So appears that the problem was actually because of MANY out-dated dependencies : -
Outdated OpenSSL -
current version displayed using OpenSSL version -a
Awesome help found # http://javigon.com/2014/04/09/update-openssl-in-osx/ to update OpenSSL and from a friend (https://anantshri.info/) who pointed out the issue itself initially.
Outdated pyOpenSSL - upgraded using the below which of course upgraded the same.
sudo pip install --upgrade pyOpenSSL
Then why was the below still showing an outdated version ?
import OpenSSL
print OpenSSL.version
0.13
because there were 2 different OpenSSLs in the system. One that was installed by pip and the other that was by default present in OSX. Again awesome help found # https://github.com/pyca/pyopenssl/issues/128
some useful commands that helper were :
pip show pyOpenSSL - gives as output :
Name: pyOpenSSL
Version: 0.15.1
Location: /Library/Python/2.7/site-packages
as part of the output - indicating that the OpenSSL installed using pip is actually 0.15.1
cross verify using :
ls /Library/Python/2.7/site-packages/ | grep OpenSSL - gives as output:
pyOpenSSL-0.15.1.dist-info
Now the path below also had another copy of OpenSSL :
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL and cat version.py in the above dir gave the below as part of output :
version = '0.13.1'
indicating that the cause of the issue with the import statement showing the outdated python version.
And the above itself was the root cause for mitmproxy also not working
because mitmproxy was unable to use the latest version on OpenSSL.
So solved the problem by just replacing the OpenSSL in the above path (which was outdated) with the updated one from /Library/Python/2.7/site-packages/
where
cat ./OpenSSL/version.py gave as output (once again just to cross-verify)
version = '0.15.1'
And now the import statement reported the right version of OpenSSL.
Uninstalled mitmproxy using sudo pip uninstall mitmproxy - successfully uninstalled. Also uninstalled virtualenv. (not sure of the above 2 was required !)
Reinstalled mitmproxy as sudo pip install mitmproxy - Successfully done !
And ran mitmproxy now from the terminal wihtout a glitch ! :)