I am written a small package and have successfully uploaded the package to pypi but when i do to install using pip, this traceback comes and it never gets installed.
Downloading/unpacking pytransmit
Getting page https://pypi.python.org/simple/pytransmit/
URLs to search for versions for pytransmit:
* https://pypi.python.org/simple/pytransmit/
Analyzing links from page https://pypi.python.org/simple/PyTransmit/
Could not find any downloads that satisfy the requirement pytransmit
Cleaning up...
Removing temporary dir c\temp\pip_build_dd...
No distributions at all found for pytransmit
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 270, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1157, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python27\lib\site-packages\pip\index.py", line 285, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pytransmit
How shall i make it installable using pip.
You don't have any files to download. You can follow the official tutorial and upload your package files.
Essencially you need to register your package first -
python setup.py register
and then upload the distributables -
python setup.py sdist bdist_wininst upload
Related
I have a Python 2 package that I'm trying to upgrade to Python 3. It was written by someone who used to work on the same team I'm on now but who is no longer with the company, and unfortunately nobody left on the team is able to help out.
After running 2to3 on the files of the package, I ran python setup.py sdist to create a package, placed the package in a local repository, then attempted to use pip install to install the package. It ended up erroring out with the following:
Exception:
Traceback (most recent call last):
File "/home/user/project/lib/python3.5/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/home/user/project/lib/python3.5/site-packages/pip/commands/install.py", line 297, in run
root=options.root_path,
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_set.py", line 622, in install
**kwargs
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_install.py", line 808, in install
self.move_wheel_files(self.source_dir, root=root)
File "/home/user/project/lib/python3.5/site-packages/pip/req/req_install.py", line 1003, in move_wheel_files
isolated=self.isolated,
File "/home/user/project/lib/python3.5/site-packages/pip/wheel.py", line 340, in move_wheel_files
assert info_dir, "%s .dist-info directory not found" % req
AssertionError: my-package-name .dist-info directory not found
The old Python 2 version of the package didn't have anything called .dist-info in the .tgz archive, and it installed just fine. Does anyone know what's going on here and how to fix it?
In my case this was resolved by deleting AppData\Local\pip\Cache folder (windows). Should be fairly similar for other operating systems.
I have a package that I submitted to Pypi using the python setup.py register command:
https://bitbucket.org/lskibinski/et3
You can see it here:
https://pypi.python.org/pypi?name=et3&version=1.0&:action=display
However, for some mysterious reason, pip install et3 doesn't work. The error I get is:
$ pip install et3 -vvv --no-cache-dir
Collecting et3
1 location(s) to search for versions of et3:
* https://pypi.python.org/simple/et3/
Getting page https://pypi.python.org/simple/et3/
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/et3/ HTTP/1.1" 200 111
Analyzing links from page https://pypi.python.org/simple/et3/
Could not find a version that satisfies the requirement et3 (from versions: )
Cleaning up...
No matching distribution found for et3
Exception information:
Traceback (most recent call last):
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/commands/install.py", line 299, in run
requirement_set.prepare_files(finder)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 522, in _prepare_file
finder, self.upgrade, require_hashes)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_install.py", line 268, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/index.py", line 491, in find_requirement
'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for et3
It seems like it can't find any versions to download. Do I need to specify something more than download_url? Are further manual steps required?
ok, figured it out. download_url doesn't appear to do much at all. I had to do:
python setup.py register
python setup.py sdist upload
... and it now works. The documentation for all of this is terrible.
I want to use PyQt5 in pycharm. After trying to install the package from Available packages, an error says: 'Install packages failed: Error occurred when installing package PyQt5.'
The complete log is here:
------------------------------------------------------------
C:\Program Files (x86)\JetBrains\PyCharm 3.0.1\helpers\packaging_tool.py run on 02/05/14 16:13:23
Downloading/unpacking PyQt5
Getting page https://pypi.python.org/simple/PyQt5/
URLs to search for versions for PyQt5:
* https://pypi.python.org/simple/PyQt5/
Analyzing links from page https://pypi.python.org/simple/PyQt5/
Could not find any downloads that satisfy the requirement PyQt5
No distributions at all found for PyQt5
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\basecommand.py", line 139, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\commands\install.py", line 266, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py", line 1026, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\index.py", line 171, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for PyQt5
What should I do?
This is what I've done is this:
Installed Python 3.3 and added to PATH
Installed PyQt5-5.2-gpl-Py3.3-Qt5.2.0-x64.exe
And I don't know how to use PyQt in pycharm.
can you provide more information?
AFAIK, you cannot install PyQt4/PyQt5 from PyPI. You would have to install it separately.
If you see this link, you can see that there are no listed packages for PyQt5 (likewise for PyQt4) on PyPI. So, you would need to download the installer separately from here and install it.
That is what the
DistributionNotFound: No distributions at all found for PyQt5
refers to.
[UPDATE]: You'll also most likely need to install sip the same way, here's how: https://askubuntu.com/a/666336/12214
FYI, installing QtPy5 with pip works in 3.6.5. According to https://www.riverbankcomputing.com/software/sip/download even 3.5 and later.
so, i am trying to upgrade my Django version to 1.4.2, but when i do pip install Django==1.4.2 -vvv i get:
Will skip URL http://awdb.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://jlxn.pypi.python.org/simple/Django/
Could not fetch URL http://euea.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
Will skip URL http://euea.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://krrw.pypi.python.org/simple/Django/
Could not fetch URL http://hfyu.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
Will skip URL http://hfyu.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://ixoj.pypi.python.org/simple/Django/
when using --verbose i noticed that i got a :
pip install -i --verbose http://d.pypi.python.org/simple Django==1.4.2
Downloading/unpacking http://d.pypi.python.org/simple
Downloading simple (1.7Mb): 1.7Mb downloaded
Cannot unpack file /tmp/pip-zgK95n-unpack/simple (downloaded from /tmp/pip-NFrk4r-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /tmp/pip-NFrk4r-build
Storing complete log in /home/administrator/.pip/pip.log
info in the log:
Exception information:
Traceback (most recent call last):
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 985, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1109, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 456, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py", line 505, in unpack_file
raise InstallationError('Cannot determine archive format of %s' % location)
InstallationError: Cannot determine archive format of /tmp/pip-NFrk4r-build
any ideas?
i was able to solve it by doing this:
pip install --verbose https://pypi.python.org/packages/source/D/Django/Django-1.4.2.tar.gz#md5=6ffecdc01ad360e1abdca1015ae0893a
the problem is that i still don't know the cause of the problem in the first place
I am trying to list ScientificPython as a dependency in my setup.py. However, during the installation process, python seems to not find the package. What is wrong in my approach?
Here is my setup:
import setuptools
setuptools.setup(name = 'MyPack', version = '0.1',
description= 'Description.',
author = 'Me',
packages = setuptools.find_packages(),
install_requires = ['ScientificPython'],
dependency_links = ["https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content"])
And this is the important part of the output when I run python setup.py install:
Processing dependencies for MyPack==0.1
Searching for ScientificPython
Reading https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content
Download error: unknown url type: https -- Some packages may not be found!
Reading http://pypi.python.org/simple/ScientificPython/
Reading http://dirac.cnrs-orleans.fr/ScientificPython/
Reading http://starship.python.net/~hinsen/ScientificPython/
No local packages or download links found for ScientificPython
Best match: None
Traceback (most recent call last):
File "setup.py", line 22, in <module>
dependency_links = ["https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content"])
File "/home/woltan/local/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/home/woltan/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/woltan/local/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 76, in run
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py", line 104, in do_egg_install
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 427, in easy_install
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 478, in install_item
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 519, in process_distribution
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 563, in resolve
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 799, in best_match
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 811, in obtain
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
Maybe one issue is, that ScientificPython is somehow not accessible though PyPI, or at least not downloadable as easy_install ScentificPython will fail with No local packages or download links found for ScentificPython.
What do I need to do in order to install ScientificPython with setuptools?
Have you tried putting the direct download link (https://sourcesup.cru.fr/frs/download.php/2309/ScientificPython-2.8.tar.gz) into the dependency_links rather than the html page as your script seems not to find the package and then tries to install None.
edit: just noticed: python apparently is not able to open https resources - try uploading it somewhere without https, using normal http
edit 2: Why don't you just put the whole ScientificPython folder into your distribution folder and make sure its setup.py (or whatever else you need to call) is called by your setup.py?
The problem is specifically that its trying to make an http connection to a https site. From what I can tell setuptools does not support connections to https. You're going to have to use another method for getting those packages.
My recommendation, if you want to use setuptools, is that you detail in the README for the file that they have to download that dependency and install it and then have the dependency in the setuptools that fails to the install if they don't have it.
Python is unable to handle https protocol, install openssl-devel package and reinstall the python to fix this.
I was getting similar error when installing MyProxyClient using easy_install:
"Download error: unknown url type: https -- Some packages may not be found!"
and other errors about not finding openssl headers.
So installing libssl-dev (on Ubuntu) solved the problem for me!