Problem with Python [duplicate]
This question already has an answer here:
ImportError: No module named pkg_resources
1 answer
i was trying to fix my GPU to use with Theano, i had a problem with the liblas.so but python worked good, but when i did
sudo ldconfig /usr/local/cuda/lib64
(i got this from internet, bad idea, i know) now i have problems with Python:
python cifar10.py
/home/franco/.local/lib/python2.7/site-packages/numpy/lib/utils.py:254: FutureWarning: Numpy has detected that you (may be) writing to an array returned
by numpy.diagonal or by selecting multiple fields in a record
array. This code will likely break in the next numpy release --
see numpy.diagonal or arrays.indexing reference docs for details.
The quick fix is to make an explicit copy (e.g., do
arr.diagonal().copy() or arr[['f0','f1']].copy()).
ai = a.__array_interface__
Traceback (most recent call last):
File "cifar10.py", line 46, in <module>
import theano
File "/home/franco/.local/lib/python2.7/site-packages/theano/__init__.py", line 103, in <module>
import theano.sandbox.cuda
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py", line 448, in <module>
from . import opt, dnn
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/opt.py", line 40, in <module>
from theano.sandbox.cuda.cula import gpu_solve
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/cula.py", line 1, in <module>
import pkg_resources
ImportError: No module named pkg_resources
Now i cant use Python. How can i fix this ?
python numpy
marked as duplicate by Kulfy, karel, dessert, George Udosen, Eric Carvalho Jan 3 at 11:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
ImportError: No module named pkg_resources
1 answer
i was trying to fix my GPU to use with Theano, i had a problem with the liblas.so but python worked good, but when i did
sudo ldconfig /usr/local/cuda/lib64
(i got this from internet, bad idea, i know) now i have problems with Python:
python cifar10.py
/home/franco/.local/lib/python2.7/site-packages/numpy/lib/utils.py:254: FutureWarning: Numpy has detected that you (may be) writing to an array returned
by numpy.diagonal or by selecting multiple fields in a record
array. This code will likely break in the next numpy release --
see numpy.diagonal or arrays.indexing reference docs for details.
The quick fix is to make an explicit copy (e.g., do
arr.diagonal().copy() or arr[['f0','f1']].copy()).
ai = a.__array_interface__
Traceback (most recent call last):
File "cifar10.py", line 46, in <module>
import theano
File "/home/franco/.local/lib/python2.7/site-packages/theano/__init__.py", line 103, in <module>
import theano.sandbox.cuda
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py", line 448, in <module>
from . import opt, dnn
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/opt.py", line 40, in <module>
from theano.sandbox.cuda.cula import gpu_solve
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/cula.py", line 1, in <module>
import pkg_resources
ImportError: No module named pkg_resources
Now i cant use Python. How can i fix this ?
python numpy
marked as duplicate by Kulfy, karel, dessert, George Udosen, Eric Carvalho Jan 3 at 11:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
ImportError: No module named pkg_resources
1 answer
i was trying to fix my GPU to use with Theano, i had a problem with the liblas.so but python worked good, but when i did
sudo ldconfig /usr/local/cuda/lib64
(i got this from internet, bad idea, i know) now i have problems with Python:
python cifar10.py
/home/franco/.local/lib/python2.7/site-packages/numpy/lib/utils.py:254: FutureWarning: Numpy has detected that you (may be) writing to an array returned
by numpy.diagonal or by selecting multiple fields in a record
array. This code will likely break in the next numpy release --
see numpy.diagonal or arrays.indexing reference docs for details.
The quick fix is to make an explicit copy (e.g., do
arr.diagonal().copy() or arr[['f0','f1']].copy()).
ai = a.__array_interface__
Traceback (most recent call last):
File "cifar10.py", line 46, in <module>
import theano
File "/home/franco/.local/lib/python2.7/site-packages/theano/__init__.py", line 103, in <module>
import theano.sandbox.cuda
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py", line 448, in <module>
from . import opt, dnn
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/opt.py", line 40, in <module>
from theano.sandbox.cuda.cula import gpu_solve
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/cula.py", line 1, in <module>
import pkg_resources
ImportError: No module named pkg_resources
Now i cant use Python. How can i fix this ?
python numpy
This question already has an answer here:
ImportError: No module named pkg_resources
1 answer
i was trying to fix my GPU to use with Theano, i had a problem with the liblas.so but python worked good, but when i did
sudo ldconfig /usr/local/cuda/lib64
(i got this from internet, bad idea, i know) now i have problems with Python:
python cifar10.py
/home/franco/.local/lib/python2.7/site-packages/numpy/lib/utils.py:254: FutureWarning: Numpy has detected that you (may be) writing to an array returned
by numpy.diagonal or by selecting multiple fields in a record
array. This code will likely break in the next numpy release --
see numpy.diagonal or arrays.indexing reference docs for details.
The quick fix is to make an explicit copy (e.g., do
arr.diagonal().copy() or arr[['f0','f1']].copy()).
ai = a.__array_interface__
Traceback (most recent call last):
File "cifar10.py", line 46, in <module>
import theano
File "/home/franco/.local/lib/python2.7/site-packages/theano/__init__.py", line 103, in <module>
import theano.sandbox.cuda
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py", line 448, in <module>
from . import opt, dnn
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/opt.py", line 40, in <module>
from theano.sandbox.cuda.cula import gpu_solve
File "/home/franco/.local/lib/python2.7/site-packages/theano/sandbox/cuda/cula.py", line 1, in <module>
import pkg_resources
ImportError: No module named pkg_resources
Now i cant use Python. How can i fix this ?
This question already has an answer here:
ImportError: No module named pkg_resources
1 answer
python numpy
python numpy
edited Jan 2 at 19:46
dessert
22.4k56198
22.4k56198
asked Jan 2 at 18:24
Franco CapraroFranco Capraro
61
61
marked as duplicate by Kulfy, karel, dessert, George Udosen, Eric Carvalho Jan 3 at 11:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kulfy, karel, dessert, George Udosen, Eric Carvalho Jan 3 at 11:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
July 2018 Update
Most people should now use
pip install setuptools(possibly with
sudo).
Some may need to (re)install the
python-setuptoolspackage via their
package manager (apt-get install,yum install, etc.).
This issue can be highly dependent on your OS and dev environment. See
the legacy/other answers below if the above isn't working for you.
Explanation
This error message is caused by a missing/broken Python
setuptools
package. Per Matt M.'s comment and setuptools issue#581,
the bootstrap script referred to below is no longer the recommended installation
method.
The bootstrap script instructions will remain below, in case it's
still helpful to anyone.
Legacy Answer
I encountered the same
ImportErrortoday while trying to use pip.
Somehow thesetuptoolspackage had been deleted in my Python
environment.
To fix the issue, run the setup script for
setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have
wgetinstalled (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with
sudoprepended.)
If you have any version of
distribute, or
anysetuptoolsbelow 0.6, you will have to uninstall it first.*
See Installation
Instructions
for further details.
* If you already have a working
distribute, upgrading it to the
"compatibility wrapper" that switches you over tosetuptoolsis
easier. But if things are already broken, don't try that.
Source: https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
July 2018 Update
Most people should now use
pip install setuptools(possibly with
sudo).
Some may need to (re)install the
python-setuptoolspackage via their
package manager (apt-get install,yum install, etc.).
This issue can be highly dependent on your OS and dev environment. See
the legacy/other answers below if the above isn't working for you.
Explanation
This error message is caused by a missing/broken Python
setuptools
package. Per Matt M.'s comment and setuptools issue#581,
the bootstrap script referred to below is no longer the recommended installation
method.
The bootstrap script instructions will remain below, in case it's
still helpful to anyone.
Legacy Answer
I encountered the same
ImportErrortoday while trying to use pip.
Somehow thesetuptoolspackage had been deleted in my Python
environment.
To fix the issue, run the setup script for
setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have
wgetinstalled (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with
sudoprepended.)
If you have any version of
distribute, or
anysetuptoolsbelow 0.6, you will have to uninstall it first.*
See Installation
Instructions
for further details.
* If you already have a working
distribute, upgrading it to the
"compatibility wrapper" that switches you over tosetuptoolsis
easier. But if things are already broken, don't try that.
Source: https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
add a comment |
July 2018 Update
Most people should now use
pip install setuptools(possibly with
sudo).
Some may need to (re)install the
python-setuptoolspackage via their
package manager (apt-get install,yum install, etc.).
This issue can be highly dependent on your OS and dev environment. See
the legacy/other answers below if the above isn't working for you.
Explanation
This error message is caused by a missing/broken Python
setuptools
package. Per Matt M.'s comment and setuptools issue#581,
the bootstrap script referred to below is no longer the recommended installation
method.
The bootstrap script instructions will remain below, in case it's
still helpful to anyone.
Legacy Answer
I encountered the same
ImportErrortoday while trying to use pip.
Somehow thesetuptoolspackage had been deleted in my Python
environment.
To fix the issue, run the setup script for
setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have
wgetinstalled (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with
sudoprepended.)
If you have any version of
distribute, or
anysetuptoolsbelow 0.6, you will have to uninstall it first.*
See Installation
Instructions
for further details.
* If you already have a working
distribute, upgrading it to the
"compatibility wrapper" that switches you over tosetuptoolsis
easier. But if things are already broken, don't try that.
Source: https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
add a comment |
July 2018 Update
Most people should now use
pip install setuptools(possibly with
sudo).
Some may need to (re)install the
python-setuptoolspackage via their
package manager (apt-get install,yum install, etc.).
This issue can be highly dependent on your OS and dev environment. See
the legacy/other answers below if the above isn't working for you.
Explanation
This error message is caused by a missing/broken Python
setuptools
package. Per Matt M.'s comment and setuptools issue#581,
the bootstrap script referred to below is no longer the recommended installation
method.
The bootstrap script instructions will remain below, in case it's
still helpful to anyone.
Legacy Answer
I encountered the same
ImportErrortoday while trying to use pip.
Somehow thesetuptoolspackage had been deleted in my Python
environment.
To fix the issue, run the setup script for
setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have
wgetinstalled (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with
sudoprepended.)
If you have any version of
distribute, or
anysetuptoolsbelow 0.6, you will have to uninstall it first.*
See Installation
Instructions
for further details.
* If you already have a working
distribute, upgrading it to the
"compatibility wrapper" that switches you over tosetuptoolsis
easier. But if things are already broken, don't try that.
Source: https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
July 2018 Update
Most people should now use
pip install setuptools(possibly with
sudo).
Some may need to (re)install the
python-setuptoolspackage via their
package manager (apt-get install,yum install, etc.).
This issue can be highly dependent on your OS and dev environment. See
the legacy/other answers below if the above isn't working for you.
Explanation
This error message is caused by a missing/broken Python
setuptools
package. Per Matt M.'s comment and setuptools issue#581,
the bootstrap script referred to below is no longer the recommended installation
method.
The bootstrap script instructions will remain below, in case it's
still helpful to anyone.
Legacy Answer
I encountered the same
ImportErrortoday while trying to use pip.
Somehow thesetuptoolspackage had been deleted in my Python
environment.
To fix the issue, run the setup script for
setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have
wgetinstalled (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with
sudoprepended.)
If you have any version of
distribute, or
anysetuptoolsbelow 0.6, you will have to uninstall it first.*
See Installation
Instructions
for further details.
* If you already have a working
distribute, upgrading it to the
"compatibility wrapper" that switches you over tosetuptoolsis
easier. But if things are already broken, don't try that.
Source: https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
answered Jan 2 at 20:50
EASYEASY
515
515
add a comment |
add a comment |