Could not import setuptools which is required to install from a source distribution. Please install setuptools

import setuptools, tokenize
no module named setuptools

I'm trying to install a specific tool that is written in python. In order to install it I need to run :

python3.6 setup build
python3.6 setup install

However when I run it I'm getting the next warnings :

/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution 
option: 'setup_requires'
warnings.warn(msg)
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution 
option: 'tests_require'
warnings.warn(msg)

So I tried to install setuptools from a local file that I downloaded from the pypi :

python3.6 -m pip install setuptools-39.2.0.zip 
Processing ./setuptools-39.2.0.zip
Could not import setuptools which is required to install from a source     distribution.
Please install setuptools.

I tried to install the whl file like you suggested :

 pip3.6 install setuptools-40.0.0-py2.py3-none-any.whl 
Requirement already satisfied: setuptools==40.0.0 from     file:///PostgreSQL/installs/setuptools-40.0.0-py2.py3-none-any.whl in /usr/local/lib/python3.6/site-packages

But still, got the same error when trying to install the python tool.What can I do ?

Note : Something that I realized now, when I try to build the tool with different user (that is not root) I'm not getting those errors however the python3.6 setup.py install part fails because the user doesnt have priviledges. So, why for root it fails ?

Thanks

if you use any linux base Debian, use:

sudo apt-get install python3-pip

This will install all the necessary packages.

setuptools must be installed to install from a source distribution , setuptools must be installed to install from a source distribution #22 running into problems after running sudo pip install -r requirements.txt. Running setup.py install for distribute Complete output from command /usr/bin/python -c "import setuptools, element of the Setuptools distribution Could not find the  it looks like one of your package dependencies is trying to run ez_setup.py (bootstraps setuptools), which is neither proper or supported on heroku. Setuptools is already available. Setuptools is already available.

If you have internet access you can install python3-setuptools using your OS package manager:

OpenSuSE/SLES: zypper in python3-setuptools

CentOS: yum install python3-setuptools

Debian/Ubuntu: apt-get install python3-setuptools

Python. How to solve "setuptools must be installed to install from a , 0 (from -r requirements.txt (line 11)) Cleaning up setuptools must be installed to install from a source distribution. I am lost here. Tried adding  Hi, I am trying to install a python package via pip by following the instructions about matplotlib (which installed nicely): ./python.exe -m pip install paho-mqtt I get the following error: Could not import setuptools which is required t

I had a problem with my PATH variable. Changing it to the PATH of the other user solved it for me.

setuptools must be installed to install from a source distribution, if you use any linux base Debian, use: sudo apt-get install python3-pip. This will install all the necessary packages. This is related to "import setuptools" from pip/req/req_install.py (~line 334). I tried manually on the python3 in my virtualenv. Due to bad linking (my fault) when building my python3 binary, the _ctypes module did not build correctly. As a result, setuptools cannot be imported. What a crazy red herring.

setuptools · PyPI, I don't understand the error what they are, but could manage to make it work. I have used the following commands sudo apt-get install  Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

History, Easily download, build, install, upgrade, and uninstall Python packages. To report a security vulnerability, please use the Tidelift security contact. with Tidelift to deliver one enterprise subscription that covers all of the open source you use. Everyone interacting in the setuptools project's codebases, issue trackers, chat  I'm having troubles with installing packages in Python 3. I have always installed packages with setup.py install. But now, when I try to install the ansicolors

Sunsetting Python 2 support, If you are upgrading or otherwise plan to re-install Setuptools or Distribute, nothing documentation, plug-ins, or other resources for setuptools users, please let us the implementation of setuptools were funded by the Open Source Applications If that encoding was a "fallback" because Python could not figure it out from  We've seen this problem occasionally for people trying to install new packages into old virtualenvs after an upgrade late last year. The solution/workaround seems to be to delete and re-create the virtualenv (or just switch to a new virtualenv), and reinstall all your packages

Comments
  • Can you install them from pip? Try python3.6 -m pip install --upgrade setuptools
  • I cant because I dont have access to the internet from my server
  • Download & install the setuptools wheel (.whl), not the zip.
  • @jwodder this should be the answer instead of what's posted currently.
  • I installed it : pip3.6 install setuptools-40.0.0-py2.py3-none-any.whl Requirement already satisfied: setuptools==40.0.0 from file:///PostgreSQL/installs/setuptools-40.0.0-py2.py3-none-any.whl in /usr/local/lib/python3.6/site-packages But I get the same error when trying to build / install the python tool
  • Makes sense, sorry
  • I dont have access to the internet from the server