How can I upgrade from Tensorflow 2.0 alpha to beta given the exception: ERROR: Cannot uninstall 'wrapt' - upgrade

When trying to install the beta version of tensorflow 2.0 I am getting the following exception:
ERROR: Failed building wheel for wrapt
Running setup.py clean for wrapt
Failed to build wrapt
Installing collected packages: tf-estimator-nightly, wrapt, tb-nightly, google-pasta, tensorflow
Found existing installation: tf-estimator-nightly 1.14.0.dev2019030115
Uninstalling tf-estimator-nightly-1.14.0.dev2019030115:
Successfully uninstalled tf-estimator-nightly-1.14.0.dev2019030115
Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
What can I do about it?
ERROR MESSAGE WHEN I TRY TO INSTALL WRAPT
(base) C:\WINDOWS\system32>pip install wrapt==1.10.0 --ignore-installed
Collecting wrapt==1.10.0
Downloading https://files.pythonhosted.org/packages/ab/43/5453a18b5a06b0d714fd50f4634524c09af4bc41214f3dddf97f59090b23/wrapt-1.10.0.tar.gz
Building wheels for collected packages: wrapt
Building wheel for wrapt (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Alienware\AppData\Local\Temp\pip-wheel-mmlqban_' --python-tag cp36
cwd: C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\
Complete output (47 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\wrapt
copying src\arguments.py -> build\lib.win-amd64-3.6\wrapt
copying src\decorators.py -> build\lib.win-amd64-3.6\wrapt
copying src\importer.py -> build\lib.win-amd64-3.6\wrapt
copying src\wrappers.py -> build\lib.win-amd64-3.6\wrapt
copying src\__init__.py -> build\lib.win-amd64-3.6\wrapt
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 79, in <module>
run_setup(with_extensions=True)
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 55, in run_setup
setup(**setup_kwargs_tmp)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\wheel\bdist_wheel.py", line 202, in run
self.run_command('build')
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 25, in run
build_ext.run(self)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\command\build_ext.py", line 308, in run
force=self.force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Failed building wheel for wrapt
Running setup.py clean for wrapt
Failed to build wrapt
Installing collected packages: wrapt
Running setup.py install for wrapt ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alienware\AppData\Local\Temp\pip-record-tbyepppf\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\
Complete output (49 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\wrapt
copying src\arguments.py -> build\lib.win-amd64-3.6\wrapt
copying src\decorators.py -> build\lib.win-amd64-3.6\wrapt
copying src\importer.py -> build\lib.win-amd64-3.6\wrapt
copying src\wrappers.py -> build\lib.win-amd64-3.6\wrapt
copying src\__init__.py -> build\lib.win-amd64-3.6\wrapt
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 79, in <module>
run_setup(with_extensions=True)
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 55, in run_setup
setup(**setup_kwargs_tmp)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Alienware\AppData\Local\Temp\pip-install-jdld9mo_\wrapt\setup.py", line 25, in run
build_ext.run(self)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\command\build_ext.py", line 308, in run
force=self.force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-jdld9mo_\\wrapt\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alienware\AppData\Local\Temp\pip-record-tbyepppf\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

I also faced this error but you can safely ignore this error.
You can read more about this, here in this issue.
Or, you can first install/update the wrapt package using pip install wrapt==1.11.0 or whatever version TF Alpha requires. Then just continue with TF Alpha installation.

Related

Running odoo in Debugging VSCode and found error ModuleNotFoundError: No module named 'stdnum' - - -

i using VSCode as my IDE for development odoo and for now run using Start > Debugging ( F5)
While running at web browser localhost:8069 ( default ) then appear
Internal Server Error and in terminal VSCode there are errors :
Traceback (most recent call last):
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/registry.py", line 63, in __new__
return cls.registries[db_name]
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: 'usu02' #this my database name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/teguhteja/P/OdooProject/odoo1/.venv/lib/python3.7/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/home/teguhteja/P/OdooProject/odoo1/.venv/lib/python3.7/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/service/server.py", line 441, in app
return self.app(e, s)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/service/wsgi_server.py", line 113, in application
return application_unproxied(environ, start_response)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/http.py", line 1306, in __call__
return self.dispatch(environ, start_response)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/http.py", line 1272, in __call__
return self.app(environ, start_wrapped)
File "/home/teguhteja/P/OdooProject/odoo1/.venv/lib/python3.7/site-packages/werkzeug/middleware/shared_data.py", line 260, in __call__
return self.app(environ, start_response)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/http.py", line 1461, in dispatch
odoo.registry(db).check_signaling()
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/__init__.py", line 104, in registry
return modules.registry.Registry(database_name)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/registry.py", line 65, in __new__
return cls.new(db_name)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/loading.py", line 457, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/loading.py", line 349, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/loading.py", line 179, in load_module_graph
load_openerp_module(package.name)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/modules/module.py", line 385, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/addons/base_vat/__init__.py", line 4, in <module>
from . import models
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/addons/base_vat/models/__init__.py", line 6, in <module>
from . import res_partner
File "/home/teguhteja/P/OdooProject/odoo1/odoo-14.0/odoo/addons/base_vat/models/res_partner.py", line 7, in <module>
import stdnum
ModuleNotFoundError: No module named 'stdnum' - - -
and i tried to searching and found here
How to fix "ModuleNotFoundError: No module named 'python-stdnum'"
UnicodeDecodeError: 'charmap' codec| Error during installation of pip python-stdnum==1.8
and then
pip install python-stdnum == 1.17 # new version
but result is same. and i check about my pip list
pip list
appdirs 1.4.4
attrs 21.2.0
Babel 2.6.0
backcall 0.2.0
bcrypt 3.2.0
beautifulsoup4 4.10.0
cached-property 1.5.2
certifi 2021.10.8
cffi 1.15.0
chardet 3.0.4
decorator 4.3.0
defusedxml 0.7.1
docutils 0.14
ebaysdk 2.1.5
freezegun 0.3.11
future 0.18.2
gevent 1.5.0
greenlet 0.4.15
html2text 2018.1.9
idna 2.6
ipdb 0.13.9
ipython 7.30.1
isodate 0.6.0
jedi 0.18.1
Jinja2 2.10.1
libsass 0.17.0
lxml 4.3.2
Mako 1.0.7
MarkupSafe 1.1.0
matplotlib-inline 0.1.3
num2words 0.5.6
ofxparse 0.19
parso 0.8.3
passlib 1.7.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 5.4.1
pip 21.3.1
polib 1.1.0
prompt-toolkit 3.0.24
psutil 5.8.0
psycopg2 2.7.7
ptyprocess 0.7.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
pydot 1.4.1
Pygments 2.10.0
pyodbc 4.0.32
pyparsing 3.0.6
PyPDF2 1.26.0
pyserial 3.4
python-dateutil 2.7.3
python-ldap 3.1.0
python-stdnum 1.17
pytz 2019.1
pyusb 1.0.2
pyzk 0.9
qrcode 6.1
reportlab 3.5.13
requests 2.21.0
requests-toolbelt 0.9.1
setuptools 41.2.0
six 1.16.0
soupsieve 2.3.1
toml 0.10.2
traitlets 5.1.1
urllib3 1.24.3
vobject 0.9.6.1
wcwidth 0.2.5
Werkzeug 0.16.1
wheel 0.37.0
xlrd 1.1.0
XlsxWriter 1.1.2
xlwt 1.3.0
and i found my python-stdnum already installed
i suspect my problem at launch.json vscode
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Odoo",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "${command:python.interpreterPath}",
// "console": "externalTerminal",
"program": "${workspaceRoot}/odoo-14.0/odoo-server",
"args": [
"--config=${workspaceRoot}/conf/odoo-training14.conf",
],
"cwd": "${workspaceRoot}",
// "env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"RedirectOutput"
]
}
]
}
how to fix my problem ?
ALTERNATIVE
currently i run odoo using below command and for debug using ipdb
python3 odoo-14.0/odoo-server -c conf/odoo-training14.conf
After trying for a few days and just found out that pip and python in the project are not pointing to .venv but to anaconda due to an update. when error
no module stdnum
actually there is a problem with pip so make sure your pip path with which pip or which python
to solve .venv that doesn't work by deleting the .venv folder, create venv in python, and install all requirements again
rm .venv
python3 -m venv .venv
source .venv/bin/activate.fish
python3 -m pip install --upgrade pip # upgrade pip
pip install -r requirements.txt
since it uses vscode make sure your interpreter with
ctrl + shift + P then
Python : Select Interpreter
and choose your .venv
after that you can debug as usual

orange3-associate install fails, other add-ons install without issue

Install error for Orang3-Associate add-on on a Windows7 PC
Command:
pip install Orange3-Associate (same result from UI Options - Add-Ons)
Error:
Collecting Orange3-Associate
Using cached Orange3-Associate-0.1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "C:\cygwin64\tmp\pip-build-nzb1zehp\Orange3-Associate\setup.py", line 32, in <module>
long_description=open(path.join(path.dirname(__file__), 'README.md')).re ad(),
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\cygwin64\\tmp\\ pip-build-nzb1zehp\\Orange3-Associate\\README.md'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\cygwin64\tmp\p ip-build-nzb1zehp\Orange3-Associate
Add-ons DataFusion and Text successfully installed.
Thanks. This was a bug in Orange3-Associate 0.1.1. It is hopefully fixed in 0.1.2, already available through pip or Options | Add-ons.

Virtualenv causing setuptools error

I am having trouble running a virtualenv, and I keep getting this same error code: "setuptools pip wheel failed with error code 1"
I saw some pages talking about how this is a discrepancy between different versions of setuptools, but I've uninstalled and reinstalled virtualenv and setuptools in several versions to no results. Does anyone know what's happening here?
Roberts-MacBook-Air:script Rob$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/Rob/Seedstages/script/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/utils/__init__.py", line 15, in <module>
File "/Users/Rob/anaconda/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/Users/Rob/anaconda/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: dlopen(/Users/Rob/Seedstages/script/venv/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyErr_ReplaceException
Referenced from: /Users/Rob/Seedstages/script/venv/lib/python2.7/lib-dynload/_io.so
Expected in: dynamic lookup
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/Users/Rob/anaconda/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv.py", line 832, in main
symlink=options.symlink)
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv.py", line 1004, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv.py", line 969, in install_wheel
'PIP_NO_INDEX': '1'
File "/Users/Rob/anaconda/lib/python2.7/site-packages/virtualenv.py", line 910, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/Rob/Seedstages/script/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1
Roberts-MacBook-Air:script Rob$
I would say that Anaconda causes the conflict, though to be more specific, it appears as if Anaconda's virtualenv is the problem. Running which virtualenv on my macbook (where I'm having the same problem) yields /Users/me/anaconda/bin/virtualenv while running it on the linux system I just tested this on yields /usr/local/bin/virtualenv.
So, on OS X, I downloaded virtualenv using /usr/local/bin/pip install virtualenv. This doesn't create a virtualenv binary (or it didn't for me) in the PATH folders, so I had to type this painfully long command:
sudo /usr/local/bin/python ... {the path to virtualenv.py in the system python's site-packages folder} new_env
And that did it. But that's ridiculous. No one wants to do that - even creating links would still be hacking it when you don't need to.
According to the ContinuumIO github page on this very subject, the virtualenv env and source /bin/activate commands are replaced with conda create -n env python=2.7 and source activate env.
Tested on my macbook (running Anaconda2 v4 on OS Yosemite) and it worked out.

Issue installing Theano in my virtualenv

I'm trying to install Theano in a virtualenv:
(dnouri_tut)[xxx#xxx virtualenvs]$ pip install Theano
but I get the following error:
Installing collected packages: scipy, numpy, Theano
Running setup.py install for scipy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
Complete output from command /home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
----------------------------------------
Command "/home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6" failed with error code 1 in /tmp/pip-build-JcZ_Qe/scipy
I would like not to depend on any system package, so I didn't use the option "--system-site-packages" to create my virtualenv.
Anybody can help?
As pointed out by user1615070, I just had to install numpy and scipy in my virtualenv before installing Theano (to not use the system versions).
To be more specific, Theano (at least version 0.8) has the specific command in its documentation. Here it is:
virtualenv --system-site-packages -p python2.7 theano-env

pip install scipy on virtualenv error RHEL6.5

I have already consulted these among other non stack overflow sources:
Install line 'pip install scipy' fails
Installing SciPy with pip
install scipy using pip in virtualenv on ubuntu 12.04
Installing SciPy on Red Hat
RHEL6.5 distro comes with python2.6 I have installed virtualenv and python2.7. Installing packages (within my virtualenv i.e. after activating it with source MyEnvs/myEnv1/bin/activate) with: pip install {package name} and can verify, using yolk -l that my environment has the the packages I want. All was find until I tried pip install scipy I get the following error:
[~]# pip install scipy
Downloading/unpacking scipy
Downloading scipy-0.14.0.tar.gz (10.2MB): 10.2MB downloaded
Running setup.py (path:/root/PythonVirtualEnvs/env1/build/scipy/setup.py) egg_info for package scipy
warning: no previously-included files matching '*_subr_*.f' found under directory 'scipy/linalg/src/id_dist/src'
no previously-included directories found matching 'scipy/special/tests/data/boost'
no previously-included directories found matching 'scipy/special/tests/data/gsl'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
no previously-included directories found matching '*/__pycache__'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
Installing collected packages: scipy
Running setup.py install for scipy
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
openblas_info:
libraries not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1521: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
libraries blas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1530: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1533: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 237, in <module>
setup_package()
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 234, in setup_package
setup(**metadata)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 173, in configuration
config.add_subpackage('scipy')
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/setup.py", line 12, in configuration
config.add_subpackage('integrate')
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/integrate/setup.py", line 12, in configuration
blas_opt = get_info('blas_opt',notfound_action=2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 350, in get_info
return cl().get_info(notfound_action)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 509, in get_info
raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
Complete output from command /root/PythonVirtualEnvs/env1/bin/python2.7 -c "import setuptools, tokenize;__file__='/root/PythonVirtualEnvs/env1/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mun5c1-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/PythonVirtualEnvs/env1/include/site/python2.7:
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
openblas_info:
libraries not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1521: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.doc)
blas_info:
libraries blas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1530: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.doc)
blas_src_info:
NOT AVAILABLE
/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1533: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.doc)
Traceback (most recent call last):
File "", line 1, in
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 237, in
setup_package()
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 234, in setup_package
setup(**metadata)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 173, in configuration
config.add_subpackage('scipy')
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/setup.py", line 12, in configuration
config.add_subpackage('integrate')
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
caller_level = 2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
caller_level = caller_level + 1)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy/integrate/setup.py", line 12, in configuration
blas_opt = get_info('blas_opt',notfound_action=2)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 350, in get_info
return cl().get_info(notfound_action)
File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 509, in get_info
raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
Cleaning up...
Command /root/PythonVirtualEnvs/env1/bin/python2.7 -c "import setuptools, tokenize;file='/root/PythonVirtualEnvs/env1/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-mun5c1-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/PythonVirtualEnvs/env1/include/site/python2.7 failed with error code 1 in /root/PythonVirtualEnvs/env1/build/scipy
Storing debug log for failure in /root/.pip/pip.log
I verified that scipy, atlas, blas have been installed through yum. I am not sure where to go from here, I would like to find a solution that uses pip, i.e. I don't want to do easy_install scipy Please let me know if you have any suggestions.
I have solved this problem by installing following packages:
sudo apt-get install python-pip python-dev build-essential
sudo apt-get install libatlas-base-dev gfortran
then install numpy or scipy and any other tools via
pip install <package--name> inside your virtualenv