Under Ubuntu 14.04 I installed python 2.76. then scipy as shown here, namely through
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
The python -c "import numpy; numpy.test()" test finishes with no error, but python -c "import scipy; scipy.test()" results in:
======================================================================
ERROR: test_fitpack.TestSplder.test_kink
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/tests/test_fitpack.py", line 333, in test_kink
splder(spl2, 1) # Should work
File "/usr/lib/python2.7/dist-packages/scipy/interpolate/fitpack.py", line 1186, in splder
"and is not differentiable %d times") % n)
ValueError: The spline has internal repeated knots and is not differentiable 1 times
Ran 8936 tests in 77.338s
FAILED (KNOWNFAIL=115, SKIP=191, errors=1)
What should I do?
Related
I have been trying to google this all over the internet and still can't figure out how to get this package installed. Any help is much appreciated. I have tried numerous examples from google to no avail.
Mac OS 10.15.3
pip freeze
asgiref==3.2.5
dj-database-url==0.5.0
Django==3.0.4
entrypoints==0.3
flake8==3.7.9
gunicorn==20.0.4
mccabe==0.6.1
postgres==3.0.0
psycopg2-binary==2.8.4
psycopg2-pool==1.1
pycodestyle==2.5.0
pyflakes==2.1.1
pytz==2019.3
sqlparse==0.3.1
whitenoise==5.0.1
pip install psycopg2
Collecting psycopg2
Using cached psycopg2-2.8.4.tar.gz (377 kB)
ERROR: Command errored out with exit status 1:
command: /Users/keeganleary/Documents/Coding/life_cal/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"
'"'/private/var/folders/s6/f4q9mnjn7q9b34gw7bz35l680000gn/T/pip-install-qwbzap8s/psycopg2/setup.py'"'"'; __file__='"'"'/private/va
r/folders/s6/f4q9mnjn7q9b34gw7bz35l680000gn/T/pip-install-qwbzap8s/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open
)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
--egg-base /private/var/folders/s6/f4q9mnjn7q9b34gw7bz35l680000gn/T/pip-install-qwbzap8s/psycopg2/pip-egg-info
cwd: /private/var/folders/s6/f4q9mnjn7q9b34gw7bz35l680000gn/T/pip-install-qwbzap8s/psycopg2/
Complete output (12 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/keeganleary/Documents/Coding/life_cal/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 20, in <mo
dule>
from setuptools.dist import Distribution, Feature
File "/Users/keeganleary/Documents/Coding/life_cal/venv/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module
>
from setuptools.depends import Require
File "/Users/keeganleary/Documents/Coding/life_cal/venv/lib/python3.8/site-packages/setuptools/depends.py", line 7, in <modu
le>
from .py33compat import Bytecode
File "/Users/keeganleary/Documents/Coding/life_cal/venv/lib/python3.8/site-packages/setuptools/py33compat.py", line 2, in <m
odule>
import array
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/array.cpython-38-darwin.so, 2)
: no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/array.cpython-38-darwin.so: code signature in
(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/array.cpython-38-darwin.so) not valid for use in proc
ess using Library Validation: Library load disallowed by System Policy
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Try
pip install psycopg2-binary
Hope this helps you
I keep getting this error when trying to run pip install ipdb on Ubuntu 18.04:
Collecting ipdb
Using cached https://files.pythonhosted.org/packages/df/78/3d0d7253dc85549db182cbe4b43b30c506c84008fcd39898122c9b6306a9/ipdb-0.12.2.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-PpJ5WV/ipdb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-PpJ5WV/ipdb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /tmp/pip-install-PpJ5WV/ipdb/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/symphony-client/setuptools/__init__.py", line 160, in <module>
monkey.patch_all()
File "/opt/symphony-client/setuptools/monkey.py", line 104, in patch_all
patch_for_msvc_specialized_compiler()
File "/opt/symphony-client/setuptools/monkey.py", line 156, in patch_for_msvc_specialized_compiler
msvc = import_module('setuptools.msvc')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named msvc
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I did a pip search msvc and it found msvc-runtime but when I try and pip install msvc-runtime I get the following:
Collecting msvc-runtime
ERROR: Could not find a version that satisfies the requirement msvc-runtime (from versions: none)
ERROR: No matching distribution found for msvc-runtime
Any help is appreciated.
I have tried to install django channels using this command.
pip install -U channels
but am getting this error
Downloading/unpacking channels Downloading
channels-2.0.2-py2.py3-none-any.whl Cleaning up... Exception:
Traceback (most recent call last): File
"/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2482, in _dep_map
return self.dep_map File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2344, in __getattr
raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/basecommand.py",
line 122, in main
status = self.run(options, args) File "/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/commands/install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File
"/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/req.py",
line 1266, in prepare_files
req_to_install.extras): File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2291, in requires
dm = self._dep_map File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2484, in _dep_map
self.__dep_map = self._compute_dependencies() File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2508, in _compute_dependencies
parsed = next(parse_requirements(distvers)) File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec") File
"/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py",
line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:]) ValueError: ('Expected version spec in', 'asgiref ~=2.1', 'at', '
~=2.1')
Storing debug log for failure in /home/praneet/.pip/pip.log
I was also stuck with same issue.
Now,I have fixed it by installing following packages:
python2
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
python3
sudo apt-get install python3-dev python3-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
I'd been working on Python distribution from Anaconda, as default. To use virtual environments, installed virtualenv. It shows that it was installed in the default location as in Anaconda. But, while creating one, it shows error. I do not understand anything as I'm not a pro. Please help. Thanks!!
avijit#avijit-Inspiron-3521:~$ virtualenv --version
15.0.3
avijit#avijit-Inspiron-3521:~$ cd Downloads/alieturklmugermany/virtualbcf/
avijit#avijit-Inspiron-3521:~/Downloads/alieturklmugermany/virtualbcf$ virtualenv bcfenv1
New python executable in /home/avijit/Downloads/alieturklmugermany/virtualbcf/bcfenv1/bin/python
Installing setuptools, pip, wheel...
Complete output from command /home/avijit/Downloa...f/bcfenv1/bin/python - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/home/avijit/anaconda2/lib/python2.7/tempfile.py", line 32, in <module>
import io as _io
File "/home/avijit/anaconda2/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: /home/avijit/Downloads/alieturklmugermany/virtualbcf/bcfenv1/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyCodec_LookupTextEncoding
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/avijit/anaconda2/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/home/avijit/anaconda2/lib/python2.7/site-packages/virtualenv.py", line 711, in main
symlink=options.symlink)
File "/home/avijit/anaconda2/lib/python2.7/site-packages/virtualenv.py", line 944, in create_environment
download=download,
File "/home/avijit/anaconda2/lib/python2.7/site-packages/virtualenv.py", line 900, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/home/avijit/anaconda2/lib/python2.7/site-packages/virtualenv.py", line 795, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/avijit/Downloa...f/bcfenv1/bin/python - setuptools pip wheel failed with error code 1
I'm having trouble with my initial virtualenv setup on Mac OS 10.8.5.
After using pip to install, I have the following error when I try to run virtualenv:
ObLaDalocal:~ dbunz$ virtualenv
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.11.4', 'console_scripts', 'virtualenv')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1959, in load
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'virtualenv' from '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2app/recipes/virtualenv.py'> has no 'main' attribute
ObLaDalocal:~ dbunz$ echo $PYTHONPATH
/usr/local/lib/python2.7/site-packages/matplotlib:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2app/recipes/
I had to burn some things to the ground, but I was able to get virtualenv to run properly.
Set up pip for multi-version mode: (sudo easy_install -m pip)
Uninstall virtualenv: sudo pip uninstall virtualenv
Reinstall virtualenv sudo pip install virtualenv
Not particularly magical.