开发者

pip freeze captures the package name as if it was on python index site, but it is not. full path is needed

I installed a package from git hub:

pip install -e git+http://github.com/un33k/django-uuslug.git#egg=django-uuslug

Then I did:

pip freeze > req.txt

I get:

开发者_如何学JAVA
django-uuslug==0.1

Now if I do a pip install -r req.txt, I get a package not found error, which due to the fact that django-uuslug is not on pypi.

Why is freeze not remembering the full path as it was given during the install?


I had the same issue. I believe it's a problem whenever the packages are in a subdirectory(e.g. src). Here's the patch that fixed it for me.

--- a/setup.py
+++ b/setup.py
@@ -11,13 +11,9 @@ setup(
     license = 'BSD',
     description = "MAC address model and form fields for Django apps.",
     long_description = read('README.rst'),
-
     author = 'Ryan Nowakowski',
     author_email = 'me@example.com',
-
-    packages = find_packages('src'),
-    package_dir = {'': 'src'},
-    
+    packages = ['macaddress'],
     install_requires = ['setuptools'],
     requires = ['netaddr'],
     #tests_requires = ['django'],


I fixed it, don't know how, but I had to change the setup.py

pip install -e git+http://github.com/un33k/django-uuslug.git#egg=django-uuslug

If you find similar issue, and find yourself on this question, just look at the setup.py in the above package. Perhaps you can tell me how I fixed it. I just moved things around a bit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜