I'm trying to run a project on Django on my laptop (Debian 8.5), but the execution of the makefile ends with the following result

virtualenv oscar Running virtualenv with interpreter /usr/bin/python2 New python executable in oscar/bin/python2 Not overwriting existing python script oscar/bin/python (you must use oscar/bin/python2) Installing setuptools, pip... Complete output from command /home/miha/opt/osdj/oscar/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip: Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page page = self._get_page(location, req) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page return HTMLPage.get_page(link, req, cache=self.cache) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page resp = urlopen(url) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__ response = urllib2.urlopen(self.get_request(url)) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 423, in open protocol = req.get_type() File "/usr/lib/python2.7/urllib2.py", line 285, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: /usr/lib/python3/dist-packages Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page page = self._get_page(location, req) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page return HTMLPage.get_page(link, req, cache=self.cache) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page resp = urlopen(url) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__ response = urllib2.urlopen(self.get_request(url)) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 423, in open protocol = req.get_type() File "/usr/lib/python2.7/urllib2.py", line 285, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: /usr/share/python-wheels/ Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page page = self._get_page(location, req) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page return HTMLPage.get_page(link, req, cache=self.cache) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page resp = urlopen(url) File "/home/miha/opt/osdj/oscar/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__ response = urllib2.urlopen(self.get_request(url)) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 423, in open protocol = req.get_type() File "/usr/lib/python2.7/urllib2.py", line 285, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: . Ignoring indexes: http://pypi.python.org/simple/ Downloading/unpacking distribute Could not find any downloads that satisfy the requirement distribute No distributions at all found for distribute Storing complete log in /root/.pip/pip.log ---------------------------------------- ...Installing setuptools, pip...done. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in <module> main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 1032, in create_environment install_wheel(to_install, py_executable, search_dirs) File "/usr/lib/python3/dist-packages/virtualenv.py", line 975, in install_wheel 'PIP_NO_INDEX': '1' File "/usr/lib/python3/dist-packages/virtualenv.py", line 917, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /home/miha/opt/osdj/oscar/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1 Makefile:13: ошибка выполнения рецепта для цели «libs» make: *** [libs] Ошибка 1 

From googling, there were options that the version of the python is old, but I have 2.7.9 (the one to which the solution offered to be updated). It was also an option that the version of python mixed up, it is more suitable. But at my request "python" gives the required 2.7.9 for the project. And about the python3 request - the third is not necessary. In the error code python3 flashes, but I do not understand where it came from and what to do with it. Makefile code

 # These targets are not files .PHONY: libs install start stop NAME = chem CTX = prod PORT = 80 DOMAIN = 127.0.0.1 DJANGO_SETTINGS_MODULE = $(NAME).settings.$(CTX) export DJANGO_SETTINGS_MODULE libs: aptitude -y install python-pip python-dev build-essential python-virtualenv libjpeg-dev daemon nginx uwsgi uwsgi-plugin-python git libmysqlclient-dev virtualenv oscar oscar/bin/pip install django-oscar==1.1.1 pysolr simplejson xlrd MySQL-python oscar/bin/pip uninstall -y Pillow oscar/bin/pip install Pillow rm -rf solr-4.7.2 wget -q http://archive.apache.org/dist/lucene/solr/4.7.2/solr-4.7.2.tgz -O solr-4.7.2.tgz tar xzf solr-4.7.2.tgz mv solr-4.7.2/example/solr/collection1/conf solr-4.7.2/example/solr/collection1/conf.original mkdir solr-4.7.2/example/solr/collection1/conf cp -rp solr.conf/* solr-4.7.2/example/solr/collection1/conf # git clone https://Ilya_tt@bitbucket.org/Ilya_tt/chem.git # change chem/settings/prod.py MYSQL install: python confgen.py $(NAME) $(CTX) $(DOMAIN) $(PORT) rm -rf /etc/nginx/sites-enabled/$(NAME)_nginx.conf rm -rf /etc/uwsgi/apps-enabled/$(NAME)_uwsgi.ini ln -s $(shell pwd)/$(NAME)_nginx.conf /etc/nginx/sites-enabled/ ln -s $(shell pwd)/$(NAME)_uwsgi.ini /etc/uwsgi/apps-enabled/ chmod 744 solr.run chown -R www-data pid chgrp -R www-data pid chown -R www-data logs chgrp -R www-data logs chown -R www-data $(NAME)/public chgrp -R www-data $(NAME)/public oscar/bin/python $(NAME)/manage.py migrate oscar/bin/python $(NAME)/manage.py loaddata init oscar/bin/python $(NAME)/manage.py loaddata flatpage oscar/bin/python $(NAME)/manage.py loaddata offer oscar/bin/python $(NAME)/manage.py collectstatic --noinput chown -R www-data $(NAME)/public chgrp -R www-data $(NAME)/public static: oscar/bin/python $(NAME)/manage.py collectstatic --noinput start: ./solr.run start service uwsgi restart stop: service uwsgi stop ./solr.run stop 

The question is what to do to avoid this error?

dpkg -l | grep wheel ii python-setuptools-whl 5.5.1-1 all Python 2 and 3 compatibility library (universal wheel) ii python-six-whl 1.8.0-1 -1 all built-package format for Python

  • > python-wheels Most likely there is an error. Remove the python-wheels or python2-wheels package and everything should work. He himself fought with this, though on the 3 python - FeroxTL
  • Thank you for your reply. I tried apt-get remove and pip uninstall with various options python-wheels or python2-wheels, wheel says that such a package was not found - Mikhail Sosnin
  • dpkg -l | grep wheel look - FeroxTL
  • There were 3 packages, all 3 deleted. Checked - no more. Run the makefile again the same error. After that 2 python-setuptools-whl packages appeared again. And python-six-whl - Mikhail Sosnin
  • For some reason, I still think that the problem is because of this. Try packages one by one from pip install to install in a virtual environment, maybe one of them fails - FeroxTL

1 answer 1

It turned out the error was performed by the command

 virtualenv oscar 

In this folder was already the folder "oscar", deleted - everything went.