this is the error :
(mysite)zjm1126#zjm1126-G41MT-S2:~/zjm_test/mysite$ ./bin/easy_install libmysqld-dev
Searching for libmysqld-dev
Reading http://pypi.python.org/simple/libmysqld-dev/
Couldn't find index page for 'libmysqld-dev' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for libmysqld-dev
Best match: None
Traceback (most recent call last):
File "./bin/easy_install", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1712, in main
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 434, in easy_install
File "/home/zjm1126/zjm_test/mysite/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/package_index.py", line 475, in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
what can i do,
thanks
Try to update setuptools:
easy_install -U setuptools
This error indicates that easy-install cannot locate the package, meaning that it is not found.
You'd be better off installing the dev package via your distribution's package manager (apt-get etc)
If you examine the output carefully, notice:
Reading http://pypi.python.org/simple/
No local packages or download links found for libmysqld-dev
Best match: None
Related
so I've created a virtual environment in my iterm2 window. this is the ques I asked earlier which has not been solved yet and my app is not running is alias modeso i tried to do the whole process again but it was showing error with plistlib so that was fixed by this answer I tried this whole process again which means I did this all this before but my app was not working so i deleted my py2app and some venv's got deleted to I downloaded miniconda3 again and then it was working until it comes to running the app even in alias mode . but I continued and deleted the dist and build and when I executed
python setup.py py2app but then i got this error
Traceback (most recent call last):
File "setup.py", line 18, in <module>
setup_requires=['py2app'],
File "/Users/divyabansal/divya/lib/python3.7/site-packages/setuptools/__init__.py", line
145, in setup
return distutils.core.setup(**attrs)
File "/Users/divyabansal/miniconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/divyabansal/miniconda3/lib/python3.7/distutils/dist.py", line 966, in
run_commands
self.run_command(cmd)
File "/Users/divyabansal/miniconda3/lib/python3.7/distutils/dist.py", line 985, in
run_command
cmd_obj.run()
File "/Users/divyabansal/divya/lib/python3.7/site-packages/py2app/build_app.py", line 756,
in run
self._run()
File "/Users/divyabansal/divya/lib/python3.7/site-packages/py2app/build_app.py", line 966,
in _run
self.run_normal()
File "/Users/divyabansal/divya/lib/python3.7/site-packages/py2app/build_app.py", line 1074,
in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/Users/divyabansal/divya/lib/python3.7/site-packages/py2app/build_app.py", line 1384,
in create_binaries
mm.mm.run_file(runtime)
File "/Users/divyabansal/divya/lib/python3.7/site-packages/macholib/MachOGraph.py", line 89,
in run_file
raise ValueError("%r does not exist" % (pathname,))
ValueError: '/Users/divyabansal/miniconda3/lib/libpython3.7.dylib'
does not exist
please help me with this problem
Thank You!
This problem can often be fixed by creating a symlink, see here for more.
ln -s /path/to/lib/libpython3.7m.dylib /path/to/lib/libpython3.7.dylib
For the above command replace it with your own path.
Following the directions on the datatable page https://datatable.readthedocs.io/en/latest/install.html
So I ran this:
$pip3 install git+https://github.com/h2oai/datatable
The result is :
Collecting git+https://github.com/h2oai/datatable
Cloning https://github.com/h2oai/datatable to /private/var/folders/d6/m67jyndd7h754m3810cl3bpm0000gp/T/pip-req-build-hv991zd2
Running command git clone -q https://github.com/h2oai/datatable /private/var/folders/d6/m67jyndd7h754m3810cl3bpm0000gp/T/pip-req-build-hv991zd2
Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run
resolver.resolve(requirement_set)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 362, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 169, in prep_for_dist
self.install_backend_dependencies(finder=finder)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
reqs = req.pep517_backend.get_requires_for_build_wheel()
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
'config_settings': config_settings
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook
raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable
This is not actionable for me: I'm not certain what to fix/ how to proceed. Hints?
Note: in the meantime I have installed version 0.10.1 as follows:
sudo pip3 install 'datatable==0.10.1'
This has important by (expression based groupby) and sortvalues() that I need
Most likely this error occurs because you're trying to build datatable using an old version of pip. In order to build datatable from source, pip version 20.0 or higher is required.
Unfortunately, there is no way for a project to specify that it needs a specific minimum version of pip. And I presume if such setting would eventually be added, only the newest versions of pip would know about it anyways, defeating the purpose.
I am trying out Heroku-16 stack and it seem's GDAL upgrade may need changes to the Python buildpack.
On cedar-14 i was using cyberdelia/heroku-geo-buildpack and heroku's own python buildpack.
Same combination used on Heroku-16 — with the only change in gdal version change in requirements to gdal==2.1.3 — results in a build error: No such file or directory: 'gdal-config'
Do I need to change something in the way I build heroku slug or does build pack's need to be upgraded.
Any tips greatly appreciated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-w_oq7nbx/gdal/setup.py", line 339, in <module>
**extra )
File "/app/.heroku/python/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 280, in run
self.find_sources()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 295, in find_sources
mm.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 526, in run
self.add_defaults()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults
sdist.add_defaults(self)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
self._add_defaults_ext()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/app/.heroku/python/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/app/.heroku/python/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-w_oq7nbx/gdal/setup.py", line 214, in finalize_options
self.gdaldir = self.get_gdal_config('prefix')
File "/tmp/pip-build-w_oq7nbx/gdal/setup.py", line 188, in get_gdal_config
return fetch_config(option)
File "/tmp/pip-build-w_oq7nbx/gdal/setup.py", line 135, in fetch_config
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
The Python buildpack way: 1.11.x works when using the cedar-14 stack only. If you set the environment variable: BUILD_WITH_GEO_LIBRARIES=1 the Python buildpack knows to download GDAL, GEOS, and PROJ. GeoDjango seems to be able to find the libraries just fine in this case. This method downloads the libraries and binaries from an S3 bucket, which contains GDAL version 1.11.5.
The custom buildpack way: One of the more popular geo-enabled buildpacks is https://github.com/cyberdelia/heroku-geo-buildpack. On the cedar-14 stack it works out of the box (remove the BUILD_WITH_GEO_LIBRARIES, purge your Heroku builder cache, redeploy).
On the heroku-16 stack, it doesn't correctly set up GDAL (explained below) nor environment variables for Django as of a6f8e24. Instead, you can use the fix (hopefully it will be merged eventually) in the buildpack at https://github.com/dschep/heroku-geo-buildpack. You'll need to set GDAL_LIBRARY_PATH and GEOS_LIBRARY_PATH in your settings.py (you can use os.getenv('GDAL_LIBRARY_PATH')).
Extended reading:
When running the Python buildpack (or a6f8e24 commit of the cyberdelia/heroku-geo-buildpack buildpack) on the heroku-16 stack, libjasper.so is missing, so the GDAL library will not successfully load. Moreover, the $PATH variable in the Python buildpack is missing the vendor binaries, so gdal-config won't work out of the box.
Appendix A - geo library versions installed:
heroku-16: Using geos version: 3.6.1, Using gdal version: 2.1.3, Using proj version: 4.9.3
cedar-14: Using geos version: 3.4.2, Using gdal version: 1.11.1, Using proj version: 4.8.0_1
When I installed PyAuduo for my MIPS embedded platform, I got this error:
running build
Traceback (most recent call last):
File "setup.py", line 122, in <module>
extra_link_args=extra_link_args)
File "/usr/local/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.5/distutils/dist.py", line 955, in
run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.5/distutils/dist.py", line 973, in
run_command
cmd_obj.ensure_finalized()
File "/usr/local/lib/python3.5/distutils/cmd.py", line 107, in
ensure_finalized
self.finalize_options()
File "/usr/local/lib/python3.5/site-packages/distutilscross-0.1-
py3.5.egg/distutilscross/crosscompile.py", line 16, in finalize_options
AttributeError: '_Environ' object has no attribute 'has_key'
It seems "crosscompile.py" cannot run python3 normally.
Does anyone have idea how to modify the code in crosscompile.py to work normally in pyhton3?
how to solve AttributeError: '_Environ' object has no attribute 'has_key'
It seems like PyAudio was built in Python 2x. Python 2x had support for has_key() function to check if keys existed in dictionaries. In Python 3x, you simply do this:
if 'the_key' in os.environ:
You can potentially change this line in crosscompile.py as a quickfix and then contact the developer (http://people.csail.mit.edu/hubert/pyaudio/#contact).
I am attempting to install pybrains but I am getting this error:
C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_setup_runner.py" C:\Users\PycharmProjects\Youtube\pybrain-pybrain-87c7ac3\setup.py
Testing started at 14:08 ...
running pycharm_test
running egg_info
writing PyBrain.egg-info\PKG-INFO
writing dependency_links to PyBrain.egg-info\dependency_links.txt
writing top-level names to PyBrain.egg-info\top_level.txt
reading manifest file 'PyBrain.egg-info\SOURCES.txt'
writing manifest file 'PyBrain.egg-info\SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_setup_runner.py", line 26, in <module>
exec (fh.read(), globals(), locals())
File "<string>", line 21, in <module>
File "C:\PYTHON34\LIB\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\PYTHON34\LIB\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\PYTHON34\LIB\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "C:\Python34\lib\site-packages\setuptools\command\test.py", line 118, in with_project_on_sys_path
func()
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_commands\pycharm_test.py", line 18, in run_tests
testLoader=loader_class()
File "C:\PYTHON34\LIB\unittest\main.py", line 92, in __init__
self.parseArgs(argv)
File "C:\PYTHON34\LIB\unittest\main.py", line 139, in parseArgs
self.createTests()
File "C:\PYTHON34\LIB\unittest\main.py", line 146, in createTests
self.module)
File "C:\PYTHON34\LIB\unittest\loader.py", line 146, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\PYTHON34\LIB\unittest\loader.py", line 146, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\PYTHON34\LIB\unittest\loader.py", line 105, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "c:\users\dhowarth\pycharmprojects\youtube\pybrain-pybrain-87c7ac3\pybrain\__init__.py", line 1, in <module>
from structure.__init__ import *
ImportError: No module named 'structure'
Process finished with exit code 1
Where do I find the 'Structure' module?
Anyone having the same issue?
I have followed the instructions on: https://github.com/pybrain/pybrain/wiki/installation.
what am I missing?
The Pybrain can be setup by pip install pybrain directly.
The FNN in pybrain have a bit problem of convergence and performance. As substitution, there are lots of advices on Python for AI, such as FANN (An example) and scikit-learn (for lots of ML method but not contains FNN directly).
Try not to use pip. I always prefer getting the entire folder from PyPI or github (if available) and then doing the simple python setup.py install.
Also, whenever you do some work with the packages which are under active development (or not very commonly use), please read their documentation.
If you see the documentation : Here. You will see that they use Python 2.x.
And you are clearly using Python 3.x.
Get Python 2.x and download the folder from github. Unzip it and install.
Hope it helps.
Cheers.
Try following queries:
pip install numpy
pip install scipy
pip install pybrain
OR:
download ez_setup.py and run it:
python ez_setup.py
OR:
use easy_install:
easy_install pybrain