First of all I have to admit that I'm a starter. I know there are similar topics like mine. But I couldn't find the proper answer.
I was installing python in my Ubuntu. Downloaded the ‘Python-3.5.1.tar.xz’. And I used the cd command to access this file's path. After that, entered './configure' then 'make'.
It gave me this message:
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Now, how can I install those specific modules ? Thank you.
Related
This is quite strange as pathlib seems already built in python > 3.4, anyone got an idea what raises the error?
ps. Package is already in pypi, the recipe was created directly from grayskull.
I'm using Windows 10. I downloaded Cabal.exe, put it in my ghc-8.8.1\bin\ directory and ran it with command cabal update. It did nothing for a while, then it ended without any messages.
Now when I run cabal install random (trying to install package "random"), I get the following error:
cabal: Error: Could not find module: System.Random with any suffix:
["gc","chs","hsc","x","y","ly","cpphs","hs","lhs","hsig","lhsig"]. If the
module is autogenerated it should be added to 'autogen-modules'.
I have no clue why it does this.
I also tried installing the package manually (following the steps from here) - downloaded package random-1.1.tar.gz and ran:
cd filepathtopackage
c:\Program Files\Apps\ghc-8.8.1\bin\runhaskell.exe Setup configure
This for a change gives me the following error:
| C:\Program Files\Apps\ghc-8.8.1\lib\Cabal-3.0.0.0\HSCabal-3.0.0.0.o: unknown symbol '.file'
Setup: Setup: unable to load package 'Cabal-3.0.0.0'
When I run ghc-pkg list, Cabal is in there, so again, no clue why it does this.
Does anyone have any tips on how to resolve this?
I have a namespace package with folder structure as:
CompanyName\DepartmentName\SubDepartmentName\PkgName
Python 3.3 onwards supports namespace packages so I have not place the __init__.py files in the following folders:
CompanyName
DepartmentName
SubDepartmentName
In the setup.py I have place the following piece of code setuptools.find_namespace_packages() instead of setuptools.find_packages().
When I try to build the sdist, using the following commands:
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python setup.py sdist
I get the following error:
package init file 'CompanyName\__init__.py' not found (or not a regular file)
package init file 'CompanyName\DepartmentName\__init__.py' not found (or not a regular file)
package init file 'CompanyName\DepartmentName\SubDepartmentName\__init__.py' not found (or not a regular file)
I have the task setup as part of azure devops pipeline's command line task and have set 'Fail on standard error' to true. The pipeline fails due to the above error.
Though Package init file not found (or not a regular file) is more like a warning than an error locally, it will cause the build pipeline to fail if you set Fail on standard error to true when using VSTS.
Locally:
VSTS with Fail on standard error to default false:
VSTS with Fail on standard error to true:
1.For this, you can choose to turn-off the option(Fail on standard error) cause the python namespace package can be generated successfully though that message occurs. So in this situation, I think you can suppress that message.
2.Also, another direction is to resolve the message when generating the package. Since the cause of the message has something to do with your definitions in your setup.py file, you should use setuptools.find_namespace_packages() like this document suggests.
Because mynamespace doesn’t contain an init.py, setuptools.find_packages() won’t find the sub-package. You must use setuptools.find_namespace_packages() instead or explicitly list all packages in your setup.py.
In addition: It's not that recommended to remove all __init__.py files in packages, check this detailed description from AndreasLukas: If you want to run a particular initialization script when the package or any of its modules or sub-packages are imported, you still require an init.py file.
I am trying to install "threepenny-gui", I simply do it by
cabal install threepenny-gui
It is a school project that I have to use it and you can find the start code here.
After I have installed it and run Calculator.hs without changing anything I get the error
ThreepennyPages.hs:13:18:
Could not find module ‘Data.Aeson’
Perhaps you meant Data.Version (from base-4.8.2.0)
Use -v to see a list of the files searched for.
ThreepennyPictures.hs:17:18:
Could not find module ‘Graphics.UI.Threepenny’
Use -v to see a list of the files searched for.
ThreepennyPictures.hs:18:8:
Could not find module ‘Graphics.UI.Threepenny.Core’
Use -v to see a list of the files searched for.
Failed, modules loaded: none.
I read here in section 4.1 that
This happens when you install a package globally, and the previous packages were installed locally.
But does not give any real solution. How should I install it correctly? Have been having similar problems when installing other modules.
I cannot import module Data.Colour, and the error as follow:
Could not find module `Data.Colour'
Use -v to see a list of the files searched for.
Failed, modules loaded: none.
Am I missing anything?
A Hayoo! search reveals that this module lives in the colour package, which you presumably don't have installed. To install it, run cabal update followed by cabal install colour.