I am trying to run following command:
pip install boto3
It looks like is start downloading and then show errors:
Collecting boto3
Downloading boto3-1.6.11-py2.py3-none-any.whl (128kB)
100% |████████████████████████████████| 133kB 2.7MB/s
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from boto3)
Collecting botocore<1.10.0,>=1.9.11 (from boto3)
Downloading botocore-1.9.11-py2.py3-none-any.whl (4.1MB)
100% |████████████████████████████████| 4.1MB 278kB/s
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3)
Using cached s3transfer-0.1.13-py2.py3-none-any.whl
Collecting python-dateutil<2.7.0,>=2.1 (from botocore<1.10.0,>=1.9.11->boto3)
Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Collecting docutils>=0.10 (from botocore<1.10.0,>=1.9.11->boto3)
Using cached docutils-0.14-py2-none-any.whl
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.10->boto3)
Collecting six>=1.5 (from python-dateutil<2.7.0,>=2.1->botocore<1.10.0,>=1.9.11->boto3)
Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, docutils, botocore, s3transfer, boto3
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/12/8qvv2_x53rz6ww3t22j2qbr80000gn/T/pip-E6G8ue-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
This is recently start happening.
How to troubleshoot from here?
Do I need to reinstall something and what is recommended way to use PIP?
Related
I'm trying to make this bit of code in my config.yml file work through CircleCI:
cd backend
pip install pipenv
pipenv install
When uploading to circleci, I get the following for this section, everything else passes:
Requirement already satisfied: pipenv in /usr/local/lib/python3.7/site-packages (2020.5.28)
Requirement already satisfied: virtualenv in /usr/local/lib/python3.7/site-packages (from pipenv) (20.0.21)
Requirement already satisfied: pip>=18.0 in /usr/local/lib/python3.7/site-packages (from pipenv) (20.1.1)
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.7/site-packages (from pipenv) (46.4.0)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.7/site-packages (from pipenv) (0.5.4)
Requirement already satisfied: certifi in /usr/local/lib/python3.7/site-packages (from pipenv) (2020.4.5.1)
Requirement already satisfied: distlib<1,>=0.3.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (0.3.0)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.1.3)
Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: six<2,>=1.9.0 in /usr/local/lib/python3.7/site-packages (from virtualenv->pipenv) (1.15.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.1.0)
Creating a virtualenv for this project…
Pipfile: /home/circleci/cyber-dive/Cyber-Dive-App/backend/Pipfile
Using /usr/local/bin/python3 (3.7.7) to create virtualenv…
created virtual environment CPython3.7.7.final.0-64 in 506ms
creator CPython3Posix(dest=/home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/circleci/.local/share/virtualenv/seed-app-data/v1.0.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Virtualenv location: /home/circleci/cyber-dive/Cyber-Dive-App/backend/.venv
Installing dependencies from Pipfile.lock (9ef944)…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
editable_packages=state.installstate.editables,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
keep_outdated=keep_outdated
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 809, in do_install_dependencies
deps_list = list(lockfile.get_requirements(dev=dev, only=requirements))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/lockfile.py", line 272, in get_requirements
yield Requirement.from_pipfile(k, v)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1183, in from_pipfile
r = VCSRequirement.from_pipfile(name, pipfile)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 897, in from_pipfile
return cls(**creation_args)
File "<attrs generated init 3bab60f45f8eb7fe6e20ab91412def0e78d5dff6>", line 31, in __init__
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 706, in get_link
extras=self.extras,
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 100, in build_vcs_link
return create_link(uri)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 40, in create_link
return Link(link)
TypeError: 'NoneType' object is not callable
Exited with code exit status 1
CircleCI received exit code 1
`
When trying to run these tasks locally, here is what I get in my terminal after pipenv install:
ValueError: Path not found or generated: WindowsPath('c:/program files/git/mingw64/bin')
I have been googling my brains out with this and I've got nothing. The path it specifies in the ValueError does exist on my computer and I currently have Python 3.8.2. I also have 3.7.7 installed as listed in my programs. Please help because I am stumped.
Ok found the issue, it appears that on 2020-05-28 was released a new version of pipenv that was causing this problem and circle still uses it, pipenv has released a new relase today, June 2nd 2020.6.2 which fixes the problem, I just added
pip install pipenv==2020.6.2
to circle config and builds are working again
EDIT: if you use cache within circleci you must explicitely uninstall the version coming from the circle docker image first or it will still fail
pip uninstall pipenv -y
New to programming. Installed Anaconda on a Windows 10 machine. Had some issues running updates.
While in Base environment, I installed my first Git repo successfully:
(base) C:\Users\samsung\Anaconda3\pkgs>pip install git+git://github.com/json-transformations/jsonflatten.git
Collecting git+git://github.com/json-transformations/jsonflatten.git
Cloning git://github.com/json-transformations/jsonflatten.git to c:\users\samsung\appdata\local\temp\pip-req-build-zeiezw
Running command git clone -q git://github.com/json-transformations/jsonflatten.git 'C:\Users\samsung\AppData\Local\Temp\p
Collecting jsoncut
Downloading jsoncut-0.6-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: click>=6.0 in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten==0.2) (7.0)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten==0.2) (0
Requirement already satisfied: pygments in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten==0.2) (2
Building wheels for collected packages: jsonflatten
Building wheel for jsonflatten (setup.py) ... done
Created wheel for jsonflatten: filename=jsonflatten-0.2-py2.py3-none-any.whl size=8116 sha256=029aafde944303cbfe872e86a13
Stored in directory: C:\Users\samsung\AppData\Local\Temp\pip-ephem-wheel-cache-so8173tt\wheels\8f\02\52\37295acfd1368a3d2
Successfully built jsonflatten
Installing collected packages: jsoncut, jsonflatten
Successfully installed jsoncut-0.6 jsonflatten-0.2
(base) C:\Users\samsung\Anaconda3\pkgs>pip install jsonflatten
Requirement already satisfied: jsonflatten in c:\users\samsung\anaconda3\lib\site-packages (0.2)
Requirement already satisfied: click>=6.0 in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten) (7.0)
Requirement already satisfied: jsoncut in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten) (0.6)
Requirement already satisfied: pygments in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten) (2.5.2)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten) (0.4.3)
I then ran jsonflatten forecast.json as a test (as well as jsonflatten C:\Users\samsung.spyder-py3\forecast.json) as the readme suggests and got the output below. I ran from base as myenv (Python) spit out a message saying jsonflatten is not recognized as a command.
(base) C:\Users\samsung\.spyder-py3>jsonflatten C:\Users\samsung\.spyder-py3\forecast.json
Traceback (most recent call last):
File "c:\users\samsung\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\samsung\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\samsung\Anaconda3\Scripts\jsonflatten.exe\__main__.py", line 7, in <module>
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\jsonflatten\cli.py", line 63, in main
output(ctx, results, indent=4, is_json=True)
File "c:\users\samsung\anaconda3\lib\site-packages\jsoncut\cli.py", line 59, in output
output = highlighter.highlight_json(output)
File "c:\users\samsung\anaconda3\lib\site-packages\jsoncut\highlighter.py", line 53, in highlight_json
return pygments.highlight(d, JsonLexer(), formatter)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\__init__.py", line 85, in highlight
return format(lex(code, lexer), formatter, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\__init__.py", line 64, in format
formatter.format(tokens, realoutfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatters\terminal.py", line 101, in format
return Formatter.format(self, tokensource, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatter.py", line 95, in format
return self.format_unencoded(tokensource, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatters\terminal.py", line 126, in format_unencoded
outfile.write(ansiformat(color, line.rstrip('\n')))
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\console.py", line 68, in ansiformat
result.append(codes[attr])
KeyError: 'darkgray'
There is a guide for troubleshooting software in Anaconda: https://www.anaconda.com/what-to-do-when-things-go-wrong-in-anaconda/ but this is a brand-new install.
Does this look like an Anaconda issue, an issue with how I am running the software or an issue with the software itself?
You're getting an error in site-packages with a module that is a dependency of something that you've installed.
Anaconda is just a distribtion, not the runtime.
The problem is from Python's pygments\console.py module, which is likely responsible for coloring the output of your jsonflatten module.
Try to see if there is a CLI flag to not colorize stuff, or don't use jsonflatten and rather use python's json.tool or separately install jq instead. (not saying those offer what you need, but they also parse JSON on the CLI)
I have Pandas version 0.24.1 on Python2 :
Python version:
[user#localhost ~]$ python -V
Python 2.7.13
Pandas version:
>>> import pandas
>>> pandas.__version__
u'0.24.1'
but need to upgrade Pandas for Python3. I have tried to update Pandas using on the Linux terminal using:
pip3 install --upgrade pandas
However the following error was returned:
[user#localhost ~]$ pip3 install --upgrade pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/e6/de/a0d3defd8f338eaf53ef716e40ef6d6c277c35d50e09b586e170169cdf0d/pandas-0.24.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting python-dateutil>=2.5.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas)
Using cached https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl
Collecting numpy>=1.12.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/f5/bf/4981bcbee43934f0adb8f764a1e70ab0ee5a448f6505bd04a87a2fda2a8b/numpy-1.16.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.5 (from python-dateutil>=2.5.0->pandas)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
Found existing installation: six 1.11.0
Uninstalling six-1.11.0:
Exception:
Traceback (most recent call last):
File "/usr/lib64/python3.6/shutil.py", line 544, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc' -> '/tmp/pip-mq4rdaea-uninstall/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/lib/python3.6/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib64/python3.6/shutil.py", line 559, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc'
I then tried : python3 -m pip install pandas
and received the same type of error:
[user#localhost ~]$ python3 -m pip install pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/e6/de/a0d3defd8f338eaf53ef716e40ef6d6c277c35d50e09b586e170169cdf0d/pandas-0.24.1-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: pytz>=2011k in /usr/lib/python3.6/site-packages (from pandas)
Collecting numpy>=1.12.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/f5/bf/4981bcbee43934f0adb8f764a1e70ab0ee5a448f6505bd04a87a2fda2a8b/numpy-1.16.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting python-dateutil>=2.5.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in /usr/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas)
Installing collected packages: numpy, python-dateutil, pandas
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 854, in install
strip_file_prefix=strip_file_prefix
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 1069, in move_wheel_files
strip_file_prefix=strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib64/python3.6/site-packages/numpy'
How can I upgrade pandas?
I have tried using sudo easy_install sqlalchemy, pip install sqlalchemy and pip install flask-sqlalchemy. I have also tried installing and uninstalling sqlalchemy and flask. I get the error
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/hupper/worker.py", line 264, in worker_main
func(*spec_args, **spec_kwargs)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 40, in main
return command.run()
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 222, in run
app_spec, name=app_name, relative_to=base, global_conf=vars)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/home/j/Downloads/ng-website-master/ngse/__init__.py", line 15, in main
config.include('.models')
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 776, in include
c = self.maybe_dotted(callable)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 876, in maybe_dotted
return self.name_resolver.maybe_resolve(dotted)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 320, in maybe_resolve
return self._resolve(dotted, package)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 327, in _resolve
return self._zope_dottedname_style(dotted, package)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 382, in _zope_dottedname_style
__import__(used)
File "/home/j/Downloads/ng-website-master/ngse/models/__init__.py", line 4, in <module>
import zope.sqlalchemy
ImportError: No module named sqlalchemy
Even after trying to upgrade sqlalchemy, I get the above error have.
Requirement already up-to-date: sqlalchemy in ./venv/lib/python2.7/site-packages
Tried upgrading flask-sqlalchemy,still get the same error
Requirement already up-to-date: flask-sqlalchemy in ./venv/lib/python2.7/site-packages
Requirement already up-to-date: SQLAlchemy>=0.8.0 in ./venv/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already up-to-date: Flask>=0.10 in ./venv/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already up-to-date: itsdangerous>=0.21 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: Jinja2>=2.4 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: Werkzeug>=0.7 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: click>=2.0 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: MarkupSafe>=0.23 in ./venv/lib/python2.7/site-packages (from Jinja2>=2.4->Flask>=0.10->flask-sqlalchemy)
I am trying to install use sqlalchemy inside a virtualenv. I also have python=2.7.14, pip=9.0.1, setuptools=38.2.5 and the supposed installed sqlalchemy=1.2.0. I used supposed because when I try upgrading and checking the version of sqlalchemy and flask-sqlalchemy, my computer shows that it's installed but I can't use it.
Here's what I get when I print out sys.path
['', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/home/j/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.0-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/dist-packages']
Please help me. I don't know what else to do
You're pip install is wrong.
Change sqalchemy to sqlalchemy so it is:
pip install sqlalchemy
And make sure to do so within the activated virtualenv.
I get the same error as you.
I solved it with:
I remove my virtrualenv, and create a new one
run pip3 install -r requirment.text install of sudo pip3 install -r requirment.text (if above command get permission denied error, you should run sudo chown -R user /usr/local/lib/python3.6/)
I am using Ubuntu 14.04 and Python 3.5; I used pip install quandl to install quandl package. I am seeing below error.
on the other hand I tried below two methods:
download .whl package and provide path where .whl file is located. I am seeing same error as below.
Processing ./Documents/Quandl-3.2.0-py2.py3-none-any.whl
Collecting inflection>=0.3.1 (from Quandl==3.2.0)
Requirement already satisfied: requests<2.18,>=2.7.0 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: numpy>=1.8 in ./.local/lib/python3.5/site-packages (from Quandl==3.2.0)
Collecting more-itertools (from Quandl==3.2.0)
Using cached more_itertools-3.2.0-py3-none-any.whl
Requirement already satisfied: python-dateutil in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: pandas>=0.14 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Installing collected packages: inflection, more-itertools, Quandl
Exception:
Traceback (most recent call last):
File "/home/rr/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/rr/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/inflection.py'
other method i tried is use sudo -apt get install python -3 quandl. While using this method I am seeing below error
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-quandl
For method 1: I am unable to understand why I am getting permission denied error message.
For method 2: Why is it not able to locate package?
I will appreciate any advice on these error messages and also any help in installing this package on python 3.5 in ubuntu 14.04.